View Single Post
  #8   Spotlight this post!  
Unread 14-02-2003, 23:35
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Quote:
Originally posted by Raven_Writer
Wasn't there supposed to be syntax highlight? I looked through everything, but nothing for highlighting. I also need a little bit of help. I shouldn't be asking this since I've done a comparision between the syntax, but how is switch used?
Parallax has said from the beginning that the alpha/beta versions won't have syntax highlighting but the final version will.

There is no "switch" command. There is a SELECT...CASE...ENDSELECT structure, which does the same thing. Ie:

SELECT counter
CASE 0 TO 100
'do stuff
CASE 101 TO 200
'do other stuff
CASE 201 TO 255
'do even more other stuff
CASE ELSE
'stuff to do if none of the previous cases match
ENDSELECT

There's other things you can put after CASE also (such as a single number or an operator and a number (ie >5)), but the above code is the basics.

--Rob
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php