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 5090 - (view) (download)

1 : jhr 5075 #version 2
2 :    
3 :     /* consts1.diderot
4 :     *
5 : jhr 5090 * Test overriding constant definitions from the command line. This test targets
6 :     * basic value types.
7 : jhr 5075 *
8 :     * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
9 :     *
10 :     * COPYRIGHT (c) 2017 The University of Chicago
11 :     * All rights reserved.
12 :     */
13 :    
14 :     const bool c1 = true;
15 :     const bool c2 = false;
16 :     const int c3 = 17;
17 : jhr 5077 const int c4;
18 : jhr 5080 const real c5 = 1.0;
19 :     const real c6 = 1.0;
20 :     const real c7 = 1.0;
21 :     const real c8 = 1.0;
22 : jhr 5082 const string c9 = "default";
23 : jhr 5075
24 :     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 5082 print ("c9 = \"", c9, "\"\n");
34 : jhr 5075 }
35 :    
36 :     strand dummy () {
37 :     output int out = 0;
38 :     update { stabilize; }
39 :     }
40 :    
41 :     create_collection { dummy() | i in 1..1 }

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