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

SCM Repository

[diderot] View of /branches/vis12/bugs/bug018.diderot
ViewVC logotype

View of /branches/vis12/bugs/bug018.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2223 - (download) (annotate)
Thu Feb 28 04:37:47 2013 UTC (7 years, 5 months ago) by glk
File size: 669 byte(s)
C keywords cannot be Diderot variable names
// BUG: have to somehow handle (either by name-mangling or
// out-right disallowing) use of C keywords as variable names;
// e.g. case, switch, float, sizeof, static
// http://en.wikipedia.org/wiki/C_syntax#Reserved_keywords

strand foo (int ii) {
    output real bar = 0;
    /* (un-comment one of the following pairs of statements) */

    int case = 10;
    int jj = case;

/*
    int switch = 10;
    int jj = switch;
*/
/*
    int float = 10;
    int jj = float;
*/
/*
    int sizeof = 10;
    int jj = sizeof;
*/
/*
    int static = 10;
    int jj = static;
*/

    update {
      print (jj, "\n");
      stabilize;
    }
}

initially [ foo(ii) | ii in 1..1 ];


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