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

SCM Repository

[diderot] Annotation of /tests/rtest/tests/consts1/consts1.diderot
ViewVC logotype

Annotation of /tests/rtest/tests/consts1/consts1.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5080 - (view) (download)

1 : jhr 5075 #version 2
2 :    
3 :     /* consts1.diderot
4 :     *
5 :     * Test overriding constant definitions from the command line
6 :     *
7 :     * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
8 :     *
9 :     * COPYRIGHT (c) 2017 The University of Chicago
10 :     * All rights reserved.
11 :     */
12 :    
13 :     const bool c1 = true;
14 :     const bool c2 = false;
15 :     const int c3 = 17;
16 : jhr 5077 const int c4;
17 : jhr 5080 const real c5 = 1.0;
18 :     const real c6 = 1.0;
19 :     const real c7 = 1.0;
20 :     const real c8 = 1.0;
21 : jhr 5075
22 : jhr 5080 /* TODO: strings, higher-order tensors, sequences */
23 :    
24 : jhr 5075 initialize {
25 :     print ("c1 = ", c1, "\n");
26 :     print ("c2 = ", c2, "\n");
27 :     print ("c3 = ", c3, "\n");
28 :     print ("c4 = ", c4, "\n");
29 : jhr 5080 print ("c5 = ", c5, "\n");
30 :     print ("c6 = ", c6, "\n");
31 :     print ("c7 = ", c7, "\n");
32 :     print ("c8 = ", c8, "\n");
33 : jhr 5075 }
34 :    
35 :     strand dummy () {
36 :     output int out = 0;
37 :     update { stabilize; }
38 :     }
39 :    
40 :     create_collection { dummy() | i in 1..1 }

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