blob: 1bf8949f3c2fa86a7c7fb3be6531343b228be04b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
namespace;
include rt;
// do/while, enum constants, and a C cast
typecheck on;
enum color { RED, GREEN = 5, BLUE };
fn main() {
int n = 0, i = 0;
do {
i++;
if (i == 2) continue;
n = n + i;
} while (i < 5);
int* p = (int*)0;
int z = (int)p;
rt.put_n(n); rt.put_c(' ');
rt.put_n(RED); rt.put_c(' '); rt.put_n(GREEN); rt.put_c(' ');
rt.put_n(BLUE); rt.put_c(' ');
rt.put_n(z); rt.put_c(10);
return 0;
}
|