Printing Crashes Rev in OSX
alex at tweedly.net
Fri Feb 4 05:24:07 CST 2005
> 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
Think of the code within the switch .... end switch delimiters as a
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