Re: Etoys - arrays/lists?

Yoshiki Ohshima <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.squeak.squeakland
Message-ID <m2y5wq1484.wl%[email protected]>
At Wed, 12 Oct 2011 07:23:36 -0400,
R.D. Latimer wrote:
> 
> Thanks,
>  I'll try Yoshiki's particle version.  For instance, in a simple coin toss program, it may be good to store percentages of heads/tails for numerous trials, like flipping
> a coin 10 times, get the percentage of heads, and run this trial 1000 times.
>  Or pick 50 random numbers from 1-500 and see how many match, are do they tend to be all unique.
>  Or in a projectile program, it may be good to store x,y positions in two arrays/lists, one for x positions, one for y positions.

  Just food for thought, here is one instance of such:

http://squeakland.org/launcher?http://dev.laptop.org/~yoshiki/etoys/MonteCarlo%20Pi.003.pr

In fact, using real objects x and y would be another way to do it.
For each try, you create a copy of small rectangle and set its x and y
to the value you want to record.

-- Yoshiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.