Possible enhancement

Peter Haworth pete at lcsql.com
Sat Feb 27 15:53:48 EST 2016


Following on from my post about the ability to enclose strings in single
quotes, I came across another php feature which I think would be useful in
LC.

The php break statement has a numeric argument that defines how many
control structures to break out off  I sometimes find myself in 3 or 4
nested repeat statements and need to get out of the whole structure if a
particular condition is met in one of the inner structures. With the php
break format, I could:

repeat .....
   repeat.....
      repeat.....
         if <condition> then break 3
      end repeat
   end repeat
end repeat

or:

repeat.....
   switch .....
      case...
         ...
         break
      case...
         ...
         break
      default
         ...
         break 2
   end switch
end repeat

The default would be 1 so no existing code would be affected.

Worth an enhancement request?



More information about the use-livecode mailing list