Skip to content

wrong : handling #2

Closed
Closed
@kbilsted

Description

@kbilsted

How does --split-lines handle IF statements?

e.g. consider the code that starts life as:

10?"heads you win!":ifrnd(.)>.5then?"heads":?"you win!":goto30
If this formats to:

10 print ""heads you win!""
11 if rnd(.) > .5 then print ""heads""
12 print ""you win!""
13 goto 30

... it is not semantically the same code. In the original, the phrase YOU WIN! will only print if the random value is over 0.5 (Heads), but in the latter, it will print regardless of the random value because it is no longer part of the IF.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions