switch (foo)
case "a"
do_a
case "b"
do_b
case "c"
do_c
break
case "d"
do_d
end switchif foo = "a", then RunRev will execute do_a, do_b and do_c. It then hits the "break" statement in case "c" and falls out of the switch.
So in your case, the print case was true, it executed the print lines, you didn't have a "break" statement so it continued executing. It ignored the quit case, and executed the quit statements.
Does that help?
-- Frank
Web Photos Pro: Software for Photo Bloggers and Other Photo Power Users See us on the web at http://www.webphotospro.com/
On Feb 4, 2005, at 4:59 AM, [EMAIL PROTECTED] wrote:
From: Sivakatirswami <[EMAIL PROTECTED]> Subject: Re: Printing Crashes Rev in OSX To: [email protected] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=US-ASCII; format=flowed
On Feb 3, 2005, at 2:37 PM, Robert Brenstein wrote:
Sounds like the above scripts do what they are supposed to do. In both cases, if the pWhichItem is quit, only the quit part executes. However, if pWhichItem is print, the former script will do the printing but because there is no break (meaning escape out of the switch clause), it continues with functions under the quit case.
In the latter case, you do not actually need break at the very end unless it s followed by the default case.
Robert
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..
Sivakatirswami
_______________________________________________ use-revolution mailing list [email protected] http://lists.runrev.com/mailman/listinfo/use-revolution
