Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
switch statements
DRedshot Offline
Senior Member

Posts: 374
Threads: 23
Joined: Jun 2011
Reputation: 11
#5
RE: switch statements

thanks Khyrpa, i don't think it was completely off topic!
as for the other way
Quote:Another way of using switch (I dont really like this way ^^)
http://wiki.frictionalgames.com/hpl2/tut...ncedtimers
That is exactly what my original post is about, I don't like using:
if(asTimer=="Time1"){// do stuff}
else if(asTimer=="Time1"){// do stuff}
else if(asTimer=="Time1"){// do stuff}
else if(asTimer=="Time1"){// do stuff}
because you end up with loads of curly brackets, and loads of lines of code. My original question was how to use the switch statement to do the above code in a neater way with less brackets Tongue

edit, just read your second post, i think this thread is solved. Thanks!

(This post was last modified: 07-20-2011, 08:44 PM by DRedshot.)
07-20-2011, 08:42 PM
Find


Messages In This Thread
switch statements - by DRedshot - 07-20-2011, 08:00 PM
RE: switch statements - by Khyrpa - 07-20-2011, 08:24 PM
RE: switch statements - by Kyle - 07-20-2011, 08:31 PM
RE: switch statements - by Khyrpa - 07-20-2011, 08:38 PM
RE: switch statements - by DRedshot - 07-20-2011, 08:42 PM
RE: switch statements - by palistov - 07-20-2011, 08:46 PM
RE: switch statements - by DRedshot - 07-20-2011, 08:49 PM
RE: switch statements - by palistov - 07-22-2011, 10:34 AM



Users browsing this thread: 2 Guest(s)