Post new topic    
Slime Knight
Send private message
else in switch 
 PostTue Dec 28, 2010 6:47 am
Send private message Reply with quote
Is else usable in a switch/case block? If not, how do I emulate that?
Super Slime
Send private message
 
 PostTue Dec 28, 2010 7:41 am
Send private message Reply with quote
Use "default" instead.
Mega Tact v1.1
Super Penguin Chef
Wizard Blocks
Liquid Metal King Slime
Send private message
 
 PostTue Dec 28, 2010 4:57 pm
Send private message Reply with quote
There is no "default" command.

... Actually, I just tested this. The switch command does indeed allow an else clause.

Code:
switch(foo) do(
  case(1) do(some action)
  case(2) do(some other action)
  case(5) do(yet another action)
  else(alternative action)
)


The fact that switch supports else was missing from the documentation. I updated the docs to mention it.
Super Slime
Send private message
 
 PostTue Dec 28, 2010 5:07 pm
Send private message Reply with quote
So... any plans to allow the correct keyword to be used? Smile
Mega Tact v1.1
Super Penguin Chef
Wizard Blocks
Liquid Metal King Slime
Send private message
 
 PostTue Dec 28, 2010 5:21 pm
Send private message Reply with quote
Nope :)
Display posts from previous: