|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
User code (syntax error, help?)
Right now, I'm trying to create a program that commands a robot to move forward while constantly monitoring the status of two limit switches. If the left limit switch is pressed, the robot backs up and turns right before resuming forward motion, and if the right limit switch is pressed, the robot backs up and turns left before resuming forward motion. This is repeated infinitely (or until 5 stops being equal to 5). Only problem is that I'm getting a compile error:
Quote:
Here's the program, both the EasyC window and the C window: ![]() ![]() If anyone can shed some light on this matter, it would be much appreciated. |
|
#2
|
||||||
|
||||||
|
Re: User code (syntax error, help?)
Pertaining to the syntax error:
Are you missing a semicolon after each "sum = left + right" statement? |
|
#3
|
|||
|
|||
|
Re: User code (syntax error, help?)
That was exactly the problem, as it turns out. Adding semicolons elliminated the syntax error and made it possible for me to download the program. Thanks!
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 180:Error: syntax error help! | seanl | Programming | 8 | 04-02-2007 11:31 |
| C18 v2.4 -- Syntax error where there is no syntax error | Joel J | Programming | 7 | 12-01-2007 17:27 |
| syntax error in code that i have never even seen before: HELP! | pbhead | Programming | 10 | 24-02-2006 14:22 |
| Syntax Error! | Denz | Programming | 15 | 04-02-2006 23:57 |