PSON decoder example using namespaced imports

This commit is contained in:
dcodeIO
2017-12-30 05:11:58 +01:00
parent c67f87a988
commit 2888ba14ad
41 changed files with 1283 additions and 336 deletions

View File

@ -1,14 +1,32 @@
export function loopWhile(n: i32): void {
while (n) {
n = n - 1;
}
}
var n = 10;
var m = 0;
export function loopWhileInWhile(n: i32): void {
while (n) {
n = n - 1;
while (n) {
n = n - 1;
}
}
while (n) {
n--;
m++;
}
assert(n == 0);
assert(m == 10);
n = 10;
m = 0;
var o = 0;
while (n) {
n--;
m++;
while (n) {
n--;
o++;
}
assert(n == 0);
assert(o == 9);
}
assert(n == 0);
assert(m == 1);
assert(o == 9);
n = 1;
m = 0;
while (n-- && ++m);
assert(n == -1);
assert(m == 1);