[Newbies] Arrays?

David Zmick dz0004455 at gmail.com
Fri Mar 7 00:15:39 UTC 2008

I have an array of SmallIntegers, and I need to multiply each object in the
array by the next.  Each object is a factor, and i need to get to the final
number, then store that number in a variable and display it on the

    array do: [:in| self num: num * in. ].
    Transcript cr; show: 'The factors are: '; show: stream contents; cr.
    Transcript show: 'The final number is: '; show: num; cr.

the stream is on the array
David Zmick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20080306/1a0b971e/attachment.htm

More information about the Beginners mailing list