-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinfile.gj
80 lines (63 loc) · 1.17 KB
/
infile.gj
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
Print ( ($b = Select 2+1 from ($a = "Saddness" + " biotch!")) + 5/2 + (%vec = [1,2,[3,4,5],6]) + "\n").
Print 5 + "\n". 3 + 6.
Print '$a exists? '.
If ($a exists)
Print '$a exists\n'.
Else
Print '$a DNE\n'.
Delete $a.
Print '$a exists? '.
If ($a exists)
Print '$a exists\n'.
Else
Print '$a DNE\n'.
$a = "Saddness" + " biotch!".
Print '$a contains \'dd\'? '.
If ($a contains 'dd') {Print 'yes\n'.}
Else {Print 'no\n'.}
Print '$a contains \'g\'? '.
If ($a contains 'g') {Print 'yes\n'.}
Else {Print 'no\n'.}
{
{
(Local $a) = '$a is different!'.
Print "block 2: \$a=$a\n".
}
Print "block 1: \$a=" + $a + '\n'.
}
If ( 1 ) {
Print "If (start)\n".
If ( 0 )
Print "If-If\n".
ElseIf ( 1 ) {
If ( 0 )
Print "If-ElseIf-If\n".
ElseIf ( 0 ) {
Print "If-ElseIf-ElseIf1\n".
}
ElseIf ( 0 ) {
Print "If-ElseIf-ElseIf2\n".
}
Else
Print "If-ElseIf-Else\n".
}
Else
Print "If-Else\n".
Print "If (end)\n".
}
ElseIf ( 0 )
Print "ElseIf\n".
Else {
Print "Else\n".
}
If (1) {
$x=0.
While ($x < "10") {
Print $x.
++$x.
}
} ElseIf ( 1 ) Print 2.
Else Print 3.
If (1) Print 1 + "\n".
Print "Break If segment!\n".
ElseIf ( 1 ) Print 2.