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

SCM Repository

[diderot] View of /branches/vis12/bugs/bug019.diderot
ViewVC logotype

View of /branches/vis12/bugs/bug019.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2238 - (download) (annotate)
Sat Mar 2 03:30:57 2013 UTC (8 years, 5 months ago) by glk
File size: 568 byte(s)
new bug

/*
  BUG: vector expressions like "[1.2, 2.3]/2" are allowed for
  initializing non-input global variables, but not for
  initializing input variables.  incrA and incrB definitions trigger
       Error: syntax error; try deleting "input"
  compilation errors
*/

input vec2 incrA = [1.2, 2.3]/2;
input vec2 incrB = [0.2/2, 0.3/2];

strand foo (int ii) {
    vec2 tmp = [0.2,0.3]/2;
    output vec2 pos = [0.1,0.1]/2;
    update {
      pos += tmp + ii*(incrA + incrB) ;
      print(ii, ": ", pos, "\n");
      stabilize;
    }
}

initially [ foo(ii) | ii in 0..9 ];

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