#1173 Leave does not work as expected

None
invalid
nobody
None
none
1
2013-05-05
2013-05-05
Walter
No

x=0
a: Do i=1 By 1
Do While x<15
x=x+1
if x=3 Then
Leave a
Say x
End
End
gives me
6 - Leave a
Error 28 running H:\lbug.rex line 6: Invalid LEAVE or ITERATE
Error 28.3: Symbol following LEAVE ("A") must either match the
label of a current loop or block instruction.

Discussion

  • Rick McGuire

    Rick McGuire - 2013-05-05

    A leading label on a DO does not tag the instruction with a name. You need to use the label keyword on the instruction:

    x=0
    Do label a i=1 By 1
    Do While x<15
    x=x+1
    if x=3 Then
    Leave a
    Say x
    End
    End

     
  • Rick McGuire

    Rick McGuire - 2013-05-05
    • status: open --> invalid
     
  • Walter

    Walter - 2013-05-05

    STRANGE!!
    Thanks

     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks