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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4640 - (download) (annotate)
Tue Sep 27 20:54:47 2016 UTC (2 years, 8 months ago) by glk
File size: 353 byte(s)
initial result of svn export --username anonsvn --password=anonsvn https://svn.smlnj-gforge.cs.uchicago.edu/svn/diderot/branches/vis15/src/tests/
// like test-foreach1.diderot, except we use a dynamic sequence
//

int[] indices = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};

strand Particle (real start)
{
    output real pose = start;
    update
    {
        foreach (int i in indices)
        {
            pose += real(i);
        }
        stabilize;
    }
}

initially [ Particle(real(n)) | n in 1..10 ];

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