-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path4.cp
More file actions
49 lines (38 loc) · 689 Bytes
/
Copy path4.cp
File metadata and controls
49 lines (38 loc) · 689 Bytes
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
var x : integer is 0;
var y : real is 3.4;
routine isFive (x : integer) : boolean is
return x = 5;
end
type bool is boolean;
routine isSix (z : integer) : bool is
if z = 6 then
return true;
end
return false;
end
routine main() is
if x then
x := 5.3;
else
if y > 5 then
x := true;
end
end
if x then
x := 5.3;
else
y := 10;
end
var z is 5 + x * y / (4 = 4);
var a : array[10] bool;
a[10] := 0;
a[9] := true;
a[8] := 9.8 /= 50;
println x;
println y;
println z;
println isSix(x);
println isFive(x);
println a[8];
return;
end