This is how I learned to format switchblocks, and I like it.  It makes it
very obvious what leads up to what, especially since a scripted switch is so
different from a CFSWITCH in how it executes.

switch (variables.switchParam) {
   case "1":
   case "2":
   case "3":
      parameters.foo[1] = parameters.foo[1] + 1;
      break;
}

Cheers,
barneyb

> -----Original Message-----
> From: Matt Robertson [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 21, 2004 4:15 PM
> To: CF-Talk
> Subject: re: cfscript'd switch with multi-params?
>
> Never mind.  RTFM.
>
> switch (variables.SwitchParam)
> {
> case "1": case "3": case "3": {
> parameters.foo[1]=parameters.foo[1]+1;
> break; }
> } // end switch
>
> Clunky, but works.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to