common code patterns

Richard Gaskin ambassador at fourthworld.com
Thu Aug 10 14:28:22 EDT 2017


FWIW I'm with Jacque on this one.  Not only are exclusive blocks far 
more common in practice, they're also explicit - you can see the work 
"BREAK" right at the end of the case block.

If a template doesn't include that explicit guidance, I fear for the 
experience of new users confused by how their code flows (not to mention 
old-timers who either forget to add "BREAK" or wonder why it isn't put 
there with the rest of the supplied code).

-- 
  Richard Gaskin
  Fourth World Systems

J. Landman Gay wrote:
> On the other hand, it would prevent the common (mostly newbie?) mistake 
> where you forget to break and the switch statements run amok. I reported a 
> bug back in the MetaCard days and was gently reminded that I was an idio... 
> um... in error.
> 
> --
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
> 
> 
> 
> On August 10, 2017 12:39:44 PM Bob Sneidar via use-livecode 
> <use-livecode at lists.runrev.com> wrote:
> 
>> Ooooh... Ah, but then someone will complain about occassionally having to 
>> delete the break.
>>
>> Bob S
>>
>>
>>> On Aug 10, 2017, at 10:30 , J. Landman Gay via use-livecode 
>>> <use-livecode at lists.runrev.com> wrote:
>>>
>>> How about every time I write a "case" statement inside a switch construct, 
>>> the editor adds a blank line and then "break"?





More information about the use-livecode mailing list