|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Pbasic 2.5 syntax
does anybody know where i can find a pbasic 2.5 language reference. I can't find it on the parallax website! help!
|
|
#2
|
||||
|
||||
|
|
|
#3
|
||||
|
||||
|
I don't think a full 2.5 code referance exsists. The only thing aviable is a PDF file included in the beta version that has the new syntax features. It should C:\Program Files\Parallax Inc\Stamp Editor v2.0 Beta 1\PBASIC Editor 2.0 Beta1.pdf. There is also a short cut in Start Menu->Programs->Parallax Inc->Stamp Editor 2.0 Beta 1->PBASIC Editor 2.0 Beta1.pdf.
Hope that helps. <edit> Guess I was wrong. Oh well.</edit> |
|
#4
|
||||
|
||||
|
Does anybody know anything about the new scratchpad syntax. could somebody please explain it to me.
|
|
#5
|
||||||
|
||||||
|
Quote:
|
|
#6
|
||||
|
||||
|
sorry this is my first time programming Pbasic. im mainly used to PHP and C++
|
|
#7
|
|||||
|
|||||
|
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?
|
|
#8
|
||||||
|
||||||
|
Quote:
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 |
|
#9
|
|||||
|
|||||
|
Quote:
|
|
#10
|
||||||
|
||||||
|
Quote:
SELECT p1_y CASE <127 ... can be thought of as an if with predicate p1_y<127. |
|
#11
|
|||||
|
|||||
|
So, SELECT / CASE is just like a easier IF/THEN statement in a way....nifty.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PBASIC language syntax | WizardOfAz | Programming | 14 | 30-04-2003 10:23 |
| PBasic 2.5 vs. 2.0 | Anthony Kesich | Programming | 6 | 09-02-2003 22:06 |
| Broken PBASIC 2.5 Complier? | Mike Yan | Programming | 12 | 01-02-2003 09:11 |
| RoboEmu 1.09 (supports PBASIC 2.5) | rbayer | Programming | 22 | 21-01-2003 17:22 |
| PBASIC 2.5 answer from Parallax | JasonS | Programming | 6 | 07-01-2003 19:21 |