-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.ec
132 lines (109 loc) · 2.25 KB
/
test.ec
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#include "foo.h"
import "ecrt"
class Form1 : Window
{
Button button1
{
caption = "Click " "Here", foreground = red;
};
bool OnCreate(
`
void OnCreate()
{
MessageBox mb { contents = $"Hello, world!!" };
mb.Modal();
MessageBox { contents = $"Hello"."Hello, world!!", anchor.bottom = 20 }.Modal();
MessageBox mb;
mb = { };
}
// This is a comment
Button button1
{
caption = "Click Here";
foreground = red;
/*bool */NotifyClicked(Button button, int x, int y, Modifiers mods)
{
MessageBox { contents = "Hello, world!!" }.Modal();
return true;
}
};
int a = 10;
anchor.right = 10;
caption = "Form1";
background = formColor;
borderStyle = sizable;
hasMaximize = true;
hasMinimize = true;
hasClose = true;
clientSize = { 632, 438 };
};
Form1 form1 { caption = "My Form" };
struct InventoryItem
{
float price = 5;
String name;
price = 10.0f;
} item, * itemPtr;
class SomeClass
{
}
int a;
typedef int bla;
int SomeFunction(int * p)
{
int hex = 0x1234;
float scientific = 1.456E23;
float scientific2 = 1.456E+23;
int b[3][4] =
{
{ 1, 0, 0, 0 },
{ 0, 1, 0, 0 },
{ 0, 0, 1, 0 }
};
int c, d, e = 4;
const String name = "Foo";
char character = 'a';
unichar unicode = '愛';
b * a;
bla blo;
b = ((a + 3) * a) - (3.1415 * 180 / a);
a = b = 5*(2 + 10);
again:
switch(a)
{
case 0: PrintLn("0"); printf(""); break;
case 1: PrintLn("1"); printf(""); break;
case 2: PrintLn("2"); printf(""); break;
case 3:
switch(b)
{
case 4:
PrintLn("Cool");
break;
case 5:
PrintLn("Awesome");
break;
default:
PrintLn("Unbelievable");
}
break;
}
if(!strcmp(name, "Foo"))
goto again;
for(c = 0; c < 10; c++)
PrintLn(c);
if(a) if(b) s; else s2;
if(a == 4)
// {
if(a == 3)
PrintLn("3!");
// }
else
PrintLn("not 4, nor 3!");
c = !b || a ^ b == a < b;
b = 4 << 5 + a[b]->cool("nice") & 32;
return eC.awesomeness <<= 1;
}
//3 + 4 * 2
//1 * 2 * 3 * 4
//-10 *23