Go to Post If you see Navy ships in port, you're going to be fine. If you see ships pulling out, or no ships at all, go East. Fast. - Matt Howard [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 31-01-2003, 08:46
powercat powercat is offline
Registered User
no team
 
Join Date: Jan 2003
Location: Kansas
Posts: 14
powercat is an unknown quantity at this point
PBasic Select Problem

Greetings,
I have chosen to use the new
SELECT construct in PBasic. Here
is the code fragment:

'Dead Reckoning Code
Select stepnum
CASE 0 : gosub go_home
CASE 1 : gosub go_home2
CASE 2 : if rc_sw3 = UP & rc_sw4 = UP then
gosub go_left
else
gosub go_right
CASE 3 : gosub go_forward
CASE 4 : if rc_sw3 = UP & rc_sw4 = UP then
gosub go_left
else
gosub go_right
CASE 5 : gosub go_longforward
ENDSELECT

When I check syntax, it always highlights the stepnum variable and provide the following error:

Expected ':' or end-of-line
Error: 129-Expected ':' or end-of-line

What causes this error ? Searched and couldn't find anything.

Am running the 2.0 beta 1 editor. It acts like it doesn't understand the new language features.

thanks in advance.
 


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
Ok one problem cantwell03 Programming 3 13-02-2003 07:28
RoboEmu 1.09 (supports PBASIC 2.5) rbayer Programming 22 21-01-2003 17:22
The problem with scouting... archiver 2001 10 23-06-2002 23:49
Major problem with chipphua motors aka Scott White Motors 18 19-03-2002 19:44
PBASIC problem punarhero Programming 7 16-02-2002 23:13


All times are GMT -5. The time now is 00:06.

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