Go to Post Dedication to FIRST gets more challenging as life gets more complicated but the rewards are SOOOOO worth it! - Sean Schuff [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 06-01-2003, 00:20
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
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
The second is:
Code:
if condition then statement
These should make people happy as if statements now work like you're used to from C/Java/etc.

2. SELECT. Almost exactly like C's switch:
Code:
SELECT variable/expression
CASE value1
commands
CASE value2
commands
ENDSELECT
3. DO...LOOP. Like do/while.
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
There's one other new one, but I can't remember what it is at this time. Something similar to BRANCH, if I remember correctly.

Hope that helps.

--Rob

P.S. RoboEmu 1.09 will support all these new commands and should be done tomorrow afternoon.
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php

Last edited by rbayer : 06-01-2003 at 00:27.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 17:15.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi