bloat-buster/tests/break_continue.bbb
David Gonzalez Martin 1b0a5c4636
All checks were successful
CI / ci (ReleaseFast, ubuntu-latest) (pull_request) Successful in 2m46s
CI / ci (ReleaseSmall, ubuntu-latest) (pull_request) Successful in 2m44s
CI / ci (ReleaseSafe, ubuntu-latest) (pull_request) Successful in 2m50s
CI / ci (Debug, ubuntu-latest) (pull_request) Successful in 4m21s
CI / ci (ReleaseFast, ubuntu-latest) (push) Successful in 2m47s
CI / ci (ReleaseSafe, ubuntu-latest) (push) Successful in 2m58s
CI / ci (ReleaseSmall, ubuntu-latest) (push) Successful in 2m37s
CI / ci (Debug, ubuntu-latest) (push) Successful in 4m21s
Loop break and continue
2025-04-28 20:19:55 -06:00

32 lines
383 B
Plaintext

[export] main = fn [cc(c)] () s32
{
>a: s32 = 0;
while (a < 10)
{
if (a == 3)
{
break;
}
a += 1;
continue;
}
>b: s32 = 2;
for (i: 0..10)
{
if (b == 2)
{
b += 1;
continue;
}
else
{
break;
}
}
return a - b;
}