Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Annotation of /tests/lamont-tests/test-foreach2.diderot
ViewVC logotype

Annotation of /tests/lamont-tests/test-foreach2.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4640 - (view) (download)

1 : glk 4640 // like test-foreach1.diderot, except we use a dynamic sequence
2 :     //
3 :    
4 :     int[] indices = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
5 :    
6 :     strand Particle (real start)
7 :     {
8 :     output real pose = start;
9 :     update
10 :     {
11 :     foreach (int i in indices)
12 :     {
13 :     pose += real(i);
14 :     }
15 :     stabilize;
16 :     }
17 :     }
18 :    
19 :     initially [ Particle(real(n)) | n in 1..10 ];

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0