Thoughts about Functions, Pseudocode & Natural Language

Mike Kerner MikeKerner at roadrunner.com
Sun Sep 13 08:41:58 EDT 2015


Well, what about "exit to button" or "exit all repeats" or "exit all
ifs" or something like that?

It's a little kluge, but at least it resembles elegant:

put false into allDone

repeat whatever1
   repeat whatever2
      repeat whatever3
         put somethinghappened into allDone
         if allDone then exit repeat
      end repeat #whatever3
      if alldone then exit repeat
   end repeat #whatever2
   if alldone then exit repeat
end repeat #whatever1


We don't have an end-terminating loop structure, either - in some other
languages that's what repeat does.

On Sat, Sep 12, 2015 at 6:12 PM, Mark Wieder <mwieder at ahsoftware.net> wrote:

> On 09/12/2015 07:12 AM, Dr. Hawkins wrote:
>
> The missing control structure that is killing me in livecode is something
>> like
>>
>> repeat for some reason or another :georgeCheck
>>
>> ...
>> exit repeat georgeCheck
>>
>>
>> which would allow leaving an outer repeat from within an inner repeat.
>>
>
> If you work at it hard enough, you can exit from an outer repeat by
> adjusting the loop indices before the next repeat.
>
> But otherwise, yes. Named control structures would be nice.
>
> --
>  Mark Wieder
>  ahsoftware at gmail.com
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."



More information about the Use-livecode mailing list