-
Notifications
You must be signed in to change notification settings - Fork 0
/
description.txt
113 lines (84 loc) · 1.44 KB
/
description.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
Shakiba Alipour (9712814013)
Antlr Project
//import
import math ;
from math import *;
from root .math import random ;
from math import power , random ;
from math import power => random ;
//arithmetic computation
y=-6*(7+ 3/5%3)- 3**4
//binary computation
x=~(2 && 2) || (4>>2)
//define variable
int a ;
double a = -2.876e23;
var myVar : int = 25, double = 45.56;
const array = new Array (1,2,3,4,5);
var array = new Array [double ];
//define class
protected class myClass extends parent implements trait1 {
public boolean flag ;
}
//class instantiation
boolean flag1 = new firstClass ();
boolean flag2 = new firstClass (12,14,input,output);
//for loop
for (i = 0;i<1;--i){
print (i);
}
//for each loop
for (var input in array ){
print (input);
}
//while loop
while (x<5) {
print ("hello");
}
//do while loop
do {
addNumbers (x,-98.09e23);
x *= 100;
} while (x<10e10);
//if statement
if (x<=2){
x++;
} else if (x>=5) {
x%=5;
} else {
x/=10;
}
//switch case
switch (x) {
case 1: x++;
break;
case 2: x--;
break;
case 3: break;
default: x**2;
}
//define function
double first (double x) {
x++;
return (x);
}
-----------------------------------
void setX (String input) {
x=input;
}
//function call
print_$ (10,"dollars");
getSystemTime ();
//try catch
try {
//comment
} on exp1 catch (variables ) {
print (exp1);
}
------------------------------------
try {
/*start of the comment
the rest of the comment*/
} catch (variables ) {
print (exp2);
}