• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Switch Case

Status
Not open for further replies.
Level 9
Joined
Sep 28, 2004
Messages
365
Hi all, i am pretty new to JASS and want to know its syntax. However after reading tutorials. I notice that JASS don't support Switch Statement. Is this true? Or if i am wrong. What is the syntax of Switch Statement in JASS?

Example:
JASS:
switch(value)
{
	case 0	:	//code here
	case 1	:	//code here
	case 2	:	//etc..
	default	:	//....
}

Because i find nesting too much If statement is inefficient. Thanks for the help!
 
Status
Not open for further replies.
Top