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

SCM Repository

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

Annotation of /branches/vis12/bugs/resolved/bug008.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2171 - (view) (download)

1 : glk 2169
2 :     /*
3 :     BUG: see if you can find the error in this Diderot program, based on:
4 :    
5 :     uncaught exception Match [nonexhaustive match failure]
6 :     raised at common/phase-timer.sml:76.50-76.52
7 :     raised at common/phase-timer.sml:76.50-76.52
8 :     raised at typechecker/typechecker.sml:950.39
9 :     raised at typechecker/util.sml:238.20
10 : jhr 2171
11 :     The correct error message is
12 :    
13 :     [bug008.diderot:25.21-26.68] Error: unable to resolve overloaded operator "'lerp'"
14 :     argument type is: (real * real * real * real * real * real)
15 :    
16 :     because of a misplaced right parenthesis.
17 : glk 2169 */
18 :    
19 :     int imgSize = 400;
20 :    
21 :     strand LIC (real xx, real yy) {
22 :     vec2 pos = [xx,yy];
23 :     output real out = 0.0;
24 :    
25 :     update {
26 :     out = |pos|;
27 :     stabilize;
28 :     }
29 :    
30 :     }
31 :    
32 :     initially [ LIC(lerp(0.0, 79.0, -0.5, real(xi), real(imgSize)-0.5,
33 :     lerp(0.0, 79.0, -0.5, real(yi), real(imgSize)-0.5)))
34 :     | yi in 0..(imgSize-1), xi in 0..(imgSize-1) ];

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