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

SCM Repository

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

View of /branches/vis12-cl/bugs/open/bug019.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2683 - (download) (annotate)
Mon Aug 25 18:56:17 2014 UTC (5 years ago) by jhr
File size: 756 byte(s)
  Port updates from vis12 branch to vis12-cl
/*
  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];
/* Note: the following are allowed:
input vec2 incrA = [0.6, 1.15];
input vec2 incrB = [0.1, 0.15];

The issue here is not vector expressions, but the use of "/" in input initialization.
*/

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