473,545 Members | 1,288 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

multiple arguments in switch?

As I can remember this is not allowed in java:

int x, y, z;

case 1,2,3:
System.out.prin tln("Hep");
But what about in JavaScript, or are there some other kind og syntax for
Jul 23 '05 #1
2 4673
JS wrote:
As I can remember this is not allowed in java:

int x, y, z;

case 1,2,3:
System.out.prin tln("Hep");
But what about in JavaScript,
If the - int - was - var - and the - System.out.prin tln - 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 >

Jul 23 '05 #2
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

"JS" <dsa.@asdf.co m> wrote in message news:d7******** **@news.net.uni-c.dk...
As I can remember this is not allowed in java:

int x, y, z;

case 1,2,3:
System.out.prin tln("Hep");
But what about in JavaScript, or are there some other kind og syntax for

Jul 23 '05 #3

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

Similar topics

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()
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 that it shows multiple div's at once. <script language="javascript"> <!-- var state = 'none'; function hide(layer_ref) {
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.
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 strings won't be known until just before the function returns. The problem is that in the calling function, I need to know both the address of...
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 that need to be processed the same way. For example, please consider the following sample switch block and notice that "other value 1, 2, and 3"...
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 Processes so as to send out 255 pings at once? (sort of a reverse ping flood). FYI: using the " -n 1" switch with Ping will cause it to only send...
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 'target' programming community herein) to get some community input and verify (or not) the following two statements. Few programmers (3 to7%)...
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 called "Point" which would have two values "x" and "y". Now, let's say if it were the Java version, I would want two constructors: one that...
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 several different types of servers and update a SQL database with vital information. Several of the servers are different and require special...
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.