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

SCM Repository

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

View of /tests/rtest/tests/consts1/consts1.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5075 - (download) (annotate)
Sat Jul 15 18:40:52 2017 UTC (23 months ago) by jhr
File size: 642 byte(s)
  Adding test for constants
#version 2

/* consts1.diderot
 *
 * Test overriding constant definitions from the command line
 *
 * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
 *
 * COPYRIGHT (c) 2017 The University of Chicago
 * All rights reserved.
 */

const bool c1 = true;
const bool c2 = false;
const int c3 = 17;
const int c4 = 23;
/* TODO: strings, tensors, sequences */

initialize {
    print ("c1 = ", c1, "\n");
    print ("c2 = ", c2, "\n");
    print ("c3 = ", c3, "\n");
    print ("c4 = ", c4, "\n");
}

strand dummy () {
    output int out = 0;
    update { stabilize; }
}

create_collection { dummy() | i in 1..1 }

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