You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
775 B
TypeScript
49 lines
775 B
TypeScript
meta("username", "skybl");
|
|
meta("hostname", "pond");
|
|
meta("editVersion", "5");
|
|
meta("editMysteryNumber", "2991");
|
|
attr("name", "benchtest.ts");
|
|
attr("authors", "skybl, ezfprg");
|
|
attr("about", "test program for transpiler benchmarks");
|
|
|
|
let a: int = 1, b: int;
|
|
input(b);
|
|
print(a + b);
|
|
|
|
let c: float = 20 / ((5 + a) ^ (a + b));
|
|
print(c);
|
|
|
|
let e: float = 1.4, f = 2;
|
|
let g = e / f;
|
|
let h: boolean = false;
|
|
|
|
print(" " + e + " / " + f + " = " + g + ", h = " + h);
|
|
|
|
let i = 2 + " hello";
|
|
let j = i + " world";
|
|
print(j);
|
|
|
|
if (a < b) {
|
|
print("a is less than b");
|
|
} else {
|
|
print('a is more than b');
|
|
}
|
|
|
|
if (true) {
|
|
print("single arm");
|
|
}
|
|
|
|
let k = 0;
|
|
|
|
while (k < 10) {
|
|
print(k);
|
|
k = k + 1;
|
|
}
|
|
|
|
for (let l = 0; 10; l++) {
|
|
print(l);
|
|
}
|
|
|
|
for (l = 20; 10; l -= 2) {
|
|
print(l);
|
|
} |