473,387 Members | 1,485 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

multiple arguments in switch?

JS
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??
Jul 23 '05 #1
2 4667
JS wrote:
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,
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.
Jul 23 '05 #2
alu
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
"JS" <dsa.@asdf.com> wrote in message news:d7**********@news.net.uni-c.dk...
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??

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

66
by: Darren Dale | last post by:
Hello, def test(data): i = ? This is the line I have trouble with if i==1: return data else: return data a,b,c,d = test()
1
by: grandeandy | last post by:
question: in the code below, and in general, how would I input multiple functions into the code, and get multiple outputs? basically, I want to be able to add say 2 or 3 of the div's to the link so...
6
by: CLEAR-RCIC | last post by:
I want to write a windows app that accepts command line arguments. Does anyone know if this can be done and if so, how to do it.
4
by: Anthony | last post by:
Hello, I am writing a function that populates an array of pointers to strings. Both the number of strings in the array, and the lengths of the strings, are dynamic; in particular, the number of...
2
by: Guadala Harry | last post by:
After RTFM, I hope I have missed something: I would like to have a switch() statement process multiple input values the same way - but without having multiple case: blocks for multiple input values...
0
by: scotty | last post by:
I need to do a ping scan of a subnet. I can Enum through the IPs and do this, but it takes over 5 minutes as I can only create 1 process at a time. Does anyone know how I can create multiple Ping...
60
by: Shawnk | last post by:
Some Sr. colleges and I have had an on going discussion relative to when and if C# will ever support 'true' multiple inheritance. Relevant to this, I wanted to query the C# community (the...
7
by: andrewfsears | last post by:
I have a question: I was wondering if it is possible to simulate the multiple constructors, like in Java (yes, I know that the languages are completely different)? Let's say that I have a class...
0
by: tochisan | last post by:
Hello all, I'm writing a c# console program that's going to be run as a service but I want it to have the ability to handle arguments and run in a certain way. The program is supposed to monitor...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.