Open Gusarich opened 3 months ago
Loops are very useful and are almost essential for most of programming languages. Many people wanted to have loops in Housing.
Suggested syntax:
let x: int = 0; while (x < 10) { x = x + 1; // body }
let x: int = 0; do { x = x + 1; // body } until (x < 10);
for (let i: int = 0; i < 10; i = i + 1) { // body }
Resolving this issue is mostly about finding a good way to implement simple while loop and then just using the same logic for do-until and for loops.
while
do-until
for
Loops are very useful and are almost essential for most of programming languages. Many people wanted to have loops in Housing.
Suggested syntax:
Resolving this issue is mostly about finding a good way to implement simple
while
loop and then just using the same logic fordo-until
andfor
loops.