As I can remember this is not allowed in java:
int x, y, z;
switch(x,y,z){
case 1,2,3:
System.out.println("Hep");
break;
}
But what about in JavaScript, or are there some other kind og syntax for
switch??
Richard Cornford - 31 May 2005 02:47 GMT
> As I can remember this is not allowed in java:
>
[quoted text clipped - 7 lines]
>
> But what about in JavaScript,
If the - int - was - var - and the - System.out.println - referred to a
function object then the rest of the syntax is fine in javascript. It is
extremely unlikely that that a list expression used as the Expression
for the - switch - statement, or the Expression for the - case - clause,
will do anything useful.
> or are there some other kind
> og syntax for switch??
By "some other kind og syntax" do you mean something that will do what
you want to do? That will inevitably depend on what it is you are trying
to do.
The FAQ for this group includes guidance on the asking of questions. You
would benefit form reading it.
<URL: http://www.jibbering.com/faq >
Richard.
alu - 31 May 2005 03:04 GMT
Could i recommend that you download the old-but-still-ever-so-easy-to-read
netscape client-side javascript reference manual?
It will provide the answer to most of your everyday questions within a few
seconds.
ftp://docs-pdf.sun.com/816-6408-10/816-6408-10.pdf
-alu
> As I can remember this is not allowed in java:
>
[quoted text clipped - 8 lines]
> But what about in JavaScript, or are there some other kind og syntax for
> switch??