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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2238 - (view) (download)

1 : glk 2238
2 :    
3 :     /*
4 :     BUG: vector expressions like "[1.2, 2.3]/2" are allowed for
5 :     initializing non-input global variables, but not for
6 :     initializing input variables. incrA and incrB definitions trigger
7 :     Error: syntax error; try deleting "input"
8 :     compilation errors
9 :     */
10 :    
11 :     input vec2 incrA = [1.2, 2.3]/2;
12 :     input vec2 incrB = [0.2/2, 0.3/2];
13 :    
14 :     strand foo (int ii) {
15 :     vec2 tmp = [0.2,0.3]/2;
16 :     output vec2 pos = [0.1,0.1]/2;
17 :     update {
18 :     pos += tmp + ii*(incrA + incrB) ;
19 :     print(ii, ": ", pos, "\n");
20 :     stabilize;
21 :     }
22 :     }
23 :    
24 :     initially [ foo(ii) | ii in 0..9 ];

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