![]() |
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. |
Re: User code (syntax error, help?)
Pertaining to the syntax error:
Are you missing a semicolon after each "sum = left + right" statement? |
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!
|
| All times are GMT -5. The time now is 09:00. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi