Nested Repeat loops
Peter M. Brigham
pmbrig at gmail.com
Sat Jun 21 09:47:29 EDT 2014
On Jun 21, 2014, at 2:33 AM, Richmond wrote:
> put 1 into XX
> repeat until XX>7
> do something
> put 1 into ZZ
> repeat until ZZ>7
> do something else
> put 1 into YY
> repeat until YY>7
> ask "What colour are you socks?"
> if it contains "purple" then
> goto %%%
> end if
> add 1 to YY
> end repeat
> add 1 to ZZ
> end repeat
> add 1 to XX
> end repeat
> %%%
I like this. The syntax could be
go %n -- eg, %4
then the execution would jump to the statement
%n -- eg, %4
(Which would allow really flexible GOTO equivalents that would be independent of script line numbering. I always struggled with the Fortran GOTO statements, since I was always having to renumber my lines when I revised my programs.)
Enhancement request, anyone?
-- Peter
Peter M. Brigham
pmbrig at gmail.com
http://home.comcast.net/~pmbrig
More information about the use-livecode
mailing list