source:
CIVL/examples/languageFeatures/choose.cvl@
6a4e2e0
| Last change on this file since 6a4e2e0 was 793cfc2, checked in by , 13 years ago | |
|---|---|
|
|
| File size: 181 bytes | |
| Rev | Line | |
|---|---|---|
| [f28d814] | 1 | #include<civlc.h> |
| [34760dc] | 2 | |
| [28d30e8] | 3 | int n = 2; |
| [34760dc] | 4 | float x; |
| 5 | ||
| 6 | void main() { | |
| 7 | l1: | |
| [f28d814] | 8 | $choose { |
| 9 | $when (n>2) { x=2; goto l2; } | |
| 10 | $when (n>1) { x=1; goto l2; } | |
| [34760dc] | 11 | default: {x=0; goto l2; } |
| 12 | } | |
| 13 | l2: ; | |
| 14 | } | |
| [59b5362] | 15 |
Note:
See TracBrowser
for help on using the repository browser.
