-
Notifications
You must be signed in to change notification settings - Fork 0
/
small-input.txt
51 lines (44 loc) · 905 Bytes
/
small-input.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Empty function
def p(): { }
def f(n: int,r: double): int {
real: double;
c1, c2: char;
c1 = (char)n;
real = (double)c1 + (double)n + r;
p(); # Invocation as a statement
return (int)c1;
}
# Variable definition
d: double;
# Main function definition
def main(): {
# Record
pair: struct {
integer: int;
character: char;
};
# Array
vector: [10][5]int;
i=0;
j=0;
while i<10 : {
while j<5 : {
vector[i][j] = i + j;
j=j+1;
}
i=i+1;
}
i=0;
pair.character = '0';
pair.integer = 48;
while pair.integer >= i: {
if pair.integer == vector[0][0] || !(int)pair.character || i%2==0:
print 't', 'r', 'u', 'e', '\n';
else
print 'f', 'a', 'l', 's', 'e', '\n';
i=i+1;
}
print f(i, (double)i); # Invocation as an expression
vector[9][(int)4.3] = 5;
f(1, 2.2); # Invocation as a statement
}