Renamed 'scripts' directory to 'examples'

Also allowed assignment within conditionals
This commit is contained in:
2026-05-26 23:40:18 +10:00
parent bbb1e38649
commit 92e4a41662
14 changed files with 34 additions and 110 deletions
+24
View File
@@ -0,0 +1,24 @@
//standard example, using 'while' instead of 'for', because it's not ready yet
var counter: Int = 0;
while (++counter <= 100) {
var result: String = "";
if (counter % 3 == 0) {
result = result .. "fizz";
}
if (counter % 5 == 0) {
result = result .. "buzz";
}
//finally
if (result != "") {
print result;
}
else {
print counter;
}
}