source:
CIVL/examples/arithmetic/assignIntWtReal.cvl@
325d439
| Last change on this file since 325d439 was 3f06ddc, checked in by , 12 years ago | |
|---|---|
|
|
| File size: 259 bytes | |
| Line | |
|---|---|
| 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> |
| 8 | void main() { |
| 9 | int x = 0.0; // implictly convert 0.0 to int. |
| 10 | assert (x==0); |
| 11 | } |
Note:
See TracBrowser
for help on using the repository browser.
