mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-06 06:58:45 +00:00
39 lines
564 B
Text
39 lines
564 B
Text
decl flow-control-test : -> \unit
|
|
def flow-control-test = {
|
|
if && ( || a < b
|
|
|| a == b )
|
|
&& b < c
|
|
then \io..print: x
|
|
elif x < 0
|
|
then {
|
|
; x += 1
|
|
; \io..print: y
|
|
} else {
|
|
return {}
|
|
}
|
|
|
|
while && a > 0
|
|
&& not: (array..is-empty:)
|
|
do {
|
|
; a -= 1
|
|
; array..pop:
|
|
}
|
|
|
|
while x < 10 do x +=. x + 3
|
|
|
|
for i in 0--y do {
|
|
; \io..print: i
|
|
}
|
|
|
|
for & i & j in (& 0--y & 0--k) do { // ??
|
|
; \io..print: 1
|
|
; \io..print: 2
|
|
; \io..print: 128
|
|
}
|
|
|
|
loop {
|
|
; y += 1
|
|
if y > 100 then
|
|
break
|
|
}
|
|
}
|