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 5082 - (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 5082 const string c9 = "default";
22 : jhr 5075
23 : jhr 5080 /* TODO: strings, higher-order tensors, sequences */
24 :    
25 : jhr 5075 initialize {
26 :     print ("c1 = ", c1, "\n");
27 :     print ("c2 = ", c2, "\n");
28 :     print ("c3 = ", c3, "\n");
29 :     print ("c4 = ", c4, "\n");
30 : jhr 5080 print ("c5 = ", c5, "\n");
31 :     print ("c6 = ", c6, "\n");
32 :     print ("c7 = ", c7, "\n");
33 :     print ("c8 = ", c8, "\n");
34 : jhr 5082 print ("c9 = \"", c9, "\"\n");
35 : jhr 5075 }
36 :    
37 :     strand dummy () {
38 :     output int out = 0;
39 :     update { stabilize; }
40 :     }
41 :    
42 :     create_collection { dummy() | i in 1..1 }

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