source:
CIVL/examples/languageFeatures/abstractFun.cvl@
7d77e64
| Last change on this file since 7d77e64 was ea777aa, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 258 bytes | |
| Rev | Line | |
|---|---|---|
| [e6b02c8] | 1 | #include<civlc.cvh> |
| [f83804d] | 2 | #include<stdio.h> |
| 3 | ||
| 4 | $input int N; | |
| [3ff27cf] | 5 | $assume(N>2); |
| [f83804d] | 6 | $abstract int colorOf(double x); |
| 7 | ||
| 8 | void main() { | |
| 9 | double u[N]; | |
| 10 | ||
| 11 | void f() { | |
| 12 | int x = colorOf(u[2]); | |
| 13 | ||
| 14 | printf("x=%d\n", x); | |
| [857de05] | 15 | x = colorOf(u[1]); |
| 16 | printf("x=%d\n", x); | |
| [f83804d] | 17 | } |
| 18 | f(); | |
| 19 | } |
Note:
See TracBrowser
for help on using the repository browser.
