Bug 20255 - Simple Loop Labeling
Mark Wieder
ahsoftware at sonic.net
Wed Aug 9 21:53:27 EDT 2017
On 08/09/2017 01:39 PM, Dr. Hawkins via use-livecode wrote:
> Eureka!
>
> I don't know why I didn't think of this earlier, but . . .
>
> A simple way to get *some* level of control structure labeling . . .
>
>
> So when finding the structure typed in the id of
>
> switch -- myLoop
>
> instead of simply adding an end switch, the comment could be copied
>
> end switch -- myLoop
>
>
> Better yet, perhaps, would be to insert "end " before the first word
> of the comment.
>
>
I do this regularly with repeat statements and if/endif statments as
well, in fact the glx2 script editor does this automatically for me. It
helps keep me more or less sane, especially when dealing with nested
structures. Instead of a comment like "myLoop" I use the parameters to
the switch or repeat or if statement, so I end up with
switch word 1 of tLine
...
end switch -- word 1 of tLine
repeat for each item tItem in tList
...
end repeat -- for each item tItem in tList
if tVariable is not empty then
...
end if -- tVariable is not empty
--
Mark Wieder
ahsoftware at gmail.com
More information about the use-livecode
mailing list