-
Notifications
You must be signed in to change notification settings - Fork 0
/
input1.txt
88 lines (72 loc) · 1.52 KB
/
input1.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
PROGRAM program
STRUCT withoutTypedef
VARS
CHAR var1,var2,var3[10],var4;
INTEGER x,y,z;
ENDSTRUCT
TYPEDEF STRUCT withTypedef
VARS
CHAR var1,var2,var3[10],var4;
INTEGER x,y,z;
withTypedef ENDSTRUCT
%comment
% another comment
/* one line comment */
/*
commenting
out
multiple
lines
of code
*/
FUNCTION function(x,y,z) /* creating a
block comment
next to
an instruction
*/
VARS
CHAR var1,var2,var3[10],var4;
INTEGER x,y,z;
var1 = 2;
var2 = var3 + 5 * 2^(3-7/(var1+var3));
var4 = var3;
var5 = function1(var1,var2);
RETURN 3;
END_FUNCTION
FUNCTION function1(a,b,c) % one line comment
var2=7;
RETURN x;
END_FUNCTION
STARTMAIN
VARS
CHAR var1,var2,var3[10],var4,var5;
INTEGER x,y,z;
var5 = var3 + 5 * 2^(3-7/(var1+var3));
WHILE(((3+4) > 3 AND x) OR y)
var5 = var3 + 5 * 2^(3-7/(var1+var3));
ENDWHILE
FOR x:=3 TO 32 STEP 1
var5 = var3 + 5 * 2^(3-7/(var1+var3));
WHILE(((3+4) > 3 AND x) OR y)
var5 = var3 + 5 * 2^(3-7/(var1+var3));
ENDWHILE
ENDFOR
IF((a>b) AND (3+4>2)) THEN
var5 = var3 + 5 * 2^(3-7/(var1+var3));
ELSEIF((3+4)>2)
var5 = var3;
ELSE
WHILE(((3+4) > 3 AND x) OR y)
var5 = var3 + 5 * 2^(3-7/(var1+var3));
ENDWHILE
ENDIF
SWITCH(((3+4) > 3 AND x) OR y)
CASE(5==3):
var6=7;
CASE(4!=3):
var2=var5;
DEFAULT:
var1=function(21);
ENDSWITCH
PRINT("This is a print", var7, var3, var0[23]);
ENDMAIN