Printing Crashes Rev in OSX

Alex Tweedly alex at tweedly.net
Fri Feb 4 06:24:07 EST 2005


Sivakatirswami wrote:

> That still seems illogical..  "a boolean is a boolean is a boolean"
>
> case "Quit" must evaluate to "false"
> if the menuPick parameter was "Print"
>
> Why would it then still execute the Quit statements?
>
> I'm probably not understanding how Switch and Case actually work..

Probably beating a dead horse by now - but my favourite analogy for this 
is ....

Think of the code within the switch .... end switch delimiters as a 
freeway (motorway)
the case statements are possible ENTRY points (on-ramps):
          if you haven't already entered, the case is evaluated and you 
MAY then enter the freeway
the break statements are EXIT points (off-ramps):
          if you run into a break statement, you do exit the switch block.

Note that the case statements are NOT off-ramps; they do not cause you 
to leave if you're already on the freeway. But, most of the time, an 
on-ramp will be preceded by an off-ramp.

(Sorry if that analogy is getting stretched, esp. if you live in an area 
where all the junctions are clover-leafs, and the off-ramps come after 
the on-ramps :-)

-- 
Alex Tweedly       http://www.tweedly.net



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.4 - Release Date: 01/02/2005



More information about the use-livecode mailing list