to:do: Question?

Jimmie Houchin jhouchin at texoma.net
Tue Jul 9 02:30:12 UTC 2002


Hello,

I was trying to do a few things and ran into a problem with to:do:.

1 to: 10 do: [:index | Transcript show: index].
Works as expected.

1 to: 10 do: [Transcript show: 'Hello World!'].

I get this error.

This block requires 0 arguments and is being evaluated with 1.

DoIt
    ^ 1
      to: 10
      do: [Transcript show: 'Hello World!']

I do not understand what is happening to cause this error.

Any help greatly appreciated.

Jimmie Houchin




More information about the Squeak-dev mailing list