|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||||
|
||||||
|
The New PBASIC
OK, I've figured it out, and in case anyone wants to get started, here are the new commands and the ways you can use them. Use at your own risk as it is possible Parallax will never release the updated editor and your code will be worthless:
1. NEW IF SYNTAX! There's two, actually. The first is: Code:
if condition then code to execute if condition is true else code to execute otherwise endif Code:
if condition then statement 2. SELECT. Almost exactly like C's switch: Code:
SELECT variable/expression CASE value1 commands CASE value2 commands ENDSELECT Either the DO or the LOOP can be followed by the keyword WHILE or UNTIL. Putting it on the DO will cause it to be checked before executing any of the body. Putting it on the LOOP will cause it to be checked only after the body has been executed at least once. Examples: Code:
DO commands to execute LOOP -or- DO WHILE condition commands to execute LOOP -or- DO commands to execute LOOP WHILE condition Hope that helps. --Rob P.S. RoboEmu 1.09 will support all these new commands and should be done tomorrow afternoon. Last edited by rbayer : 06-01-2003 at 00:27. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PBASIC ARCTAN function | Greg Ross | Programming | 14 | 11-05-2003 12:28 |
| Obscure PBASIC for RoboEmu | rbayer | Programming | 1 | 28-03-2003 23:57 |
| PBasic 2.5 vs. 2.0 | Anthony Kesich | Programming | 6 | 09-02-2003 22:06 |
| RoboEmu 1.09 (supports PBASIC 2.5) | rbayer | Programming | 22 | 21-01-2003 17:22 |
| PBASIC Loop Speed? | archiver | 2001 | 3 | 23-06-2002 23:46 |