o nevermind, i figured it out.
display
stream contents 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.
What is your question?On Fri, Mar 7, 2008 at 1:15 PM, David Zmick <dz0004455@gmail.com> wrote: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 transcript.
display
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
Gulik.
--
http://people.squeakfoundation.org/person/mikevdg
http://gulik.pbwiki.com/
_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners