Remix.run Logo
pansa2 4 hours ago

`case while` evaluates the condition. If the condition's true it moves forward to the next line (i.e. into the body of the loop), but if it's false it moves forward several lines, until the line after the `end` statement.

`case end` simply moves back to the `while` statement and lets the `case while` code run again.

Essentially:

        while n 1 >=
        ...
        end
becomes:

    start:
        if not (n 1 >=) goto done
        ...
        goto start
    done: