source: CIVL/examples/arithmetic/assignIntWtReal.cvl@ dcdf9aa

1.23 2.0 acw/focus-triggers main test-branch
Last change on this file since dcdf9aa was c9a341b, checked in by Manchun Zheng <zmanchun@…>, 12 years ago

used constantNode.getConstantValue() in CIVL model builder instead of parsing the value, to make use of ABC's analysis on the constant value; started to work on printing an AST to a CIVL program.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@1068 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 259 bytes
RevLine 
[3f06ddc]1/**
2 * This example demonstrates the implicit conversion of an assignment.
3 * Command line execution:
4 * civl verify assignIntWtReal.cvl
5 */
6#include<civlc.h>
7#include<assert.h>
8void main() {
[c9a341b]9 int x = 1.5; // implictly convert 0.0 to int.
10 assert (x==1);
[3f06ddc]11}
Note: See TracBrowser for help on using the repository browser.