Author Topic: "Break" action to get out of loops  (Read 3768 times)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
"Break" action to get out of loops
« on: August 08, 2017, 01:34:50 PM »
With the addition of for loops, where using a variable to stop the loop a la
Code: [Select]
Set Boolean [Loop] to True
Start Loop While : [Loop] Equals True
    Begin Text Compare : [Condition] Equals 'true'
        Set Boolean [Loop] to False
    End Condition
End Loop
Is not possible, I would like to request an action to break out of loops directly.

It would be the equivalent of
Code: [Select]
Start Loop While : [{EXP:1=1}] Equals '1'
    Begin Text Compare : [Condition] Equals 'true'
        Jump to Marker: Break
    End Condition
End Loop
Marker: Break
Where the "Break" action would jump to the action below the "End Loop" block, without requiring an additional marker(In the same way the "Jump to a Place in this Command" action can jump directly to the beginning or end of the command, or the "Exit Command" action, which is shorthand for the latter).
« Last Edit: September 17, 2017, 06:13:48 AM by Pfeil »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: "Break" action to get out of loops
« Reply #1 on: August 13, 2017, 11:56:14 PM »
Added a new, 'Loop Break' action that will be in the next beta ;)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: "Break" action to get out of loops
« Reply #2 on: August 14, 2017, 01:45:42 AM »


Thanks, Gary ;D

EDIT: Added and working in v1.6.7.8
« Last Edit: September 17, 2017, 06:13:41 AM by Pfeil »