Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AbrahamR, 7th_zorro, dr_panther, 1 invisible), 702 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
switch/ more then one expression? #327397
06/06/10 10:26
06/06/10 10:26
Joined: May 2006
Posts: 50
austria
R
roald Offline OP
Junior Member
roald  Offline OP
Junior Member
R

Joined: May 2006
Posts: 50
austria
hi guys...

can i use more than one expression using the switch statement?

i tried, but always get an syntaxerror message when i do it like this:


var blavar1;
var blavar2;
var blavar3;

function blabla()
{

switch (blavar1,blavar2,blavar3)
{
case 1,1,1:
do something....
break;
default:
do something different;

}
}


thx, roald

Re: switch/ more then one expression? [Re: roald] #327401
06/06/10 10:35
06/06/10 10:35
Joined: Sep 2009
Posts: 993
Budapest
Aku_Aku Offline
User
Aku_Aku  Offline
User

Joined: Sep 2009
Posts: 993
Budapest
From the Manual:
Quote:
The switch statement allows for branching on multiple values of a variable or expression.

The a means here one.
So, the answer is no.

Re: switch/ more then one expression? [Re: Aku_Aku] #327410
06/06/10 10:49
06/06/10 10:49
Joined: May 2006
Posts: 50
austria
R
roald Offline OP
Junior Member
roald  Offline OP
Junior Member
R

Joined: May 2006
Posts: 50
austria
hi aku...

thanks!

greetz to hungary!
roald

Re: switch/ more then one expression? [Re: roald] #327418
06/06/10 11:05
06/06/10 11:05
Joined: Sep 2009
Posts: 993
Budapest
Aku_Aku Offline
User
Aku_Aku  Offline
User

Joined: Sep 2009
Posts: 993
Budapest
cool

Greet to Austria too!


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1