Postfix '++' & '--' works (prefix & postfix are both tested)

This commit is contained in:
2025-01-09 18:33:10 +11:00
parent 6f16c31f24
commit 14696833fd
6 changed files with 140 additions and 16 deletions

View File

@@ -1,8 +1,8 @@
//standard example, using 'while' instead of 'for', because it's not ready yet
var counter: int = 1;
var counter: int = 0;
while (counter <= 100) {
while (++counter <= 100) {
var result: string = "";
if (counter % 3 == 0) {
@@ -20,7 +20,5 @@ while (counter <= 100) {
else {
print counter;
}
counter += 1;
}