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

SCM Repository

[diderot] View of /tests/vis12-bugs/src/bug019.diderot
ViewVC logotype

View of /tests/vis12-bugs/src/bug019.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4640 - (download) (annotate)
Tue Sep 27 20:54:47 2016 UTC (2 years, 10 months ago) by glk
File size: 756 byte(s)
initial result of svn export --username anonsvn --password=anonsvn https://svn.smlnj-gforge.cs.uchicago.edu/svn/diderot/branches/vis15/src/tests/
/*
  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