View unanswered posts | View active topics It is currently Fri Dec 14, 2018 1:08 pm






Reply to topic  [ 4 posts ] 
cant reference integer from header file 
Author Message
Rookie
User avatar

Joined: Sat Aug 16, 2014 8:57 pm
Posts: 10
Location: Sharon, MA
Post cant reference integer from header file
We have an autonomous header include file written above another include file and we cannot call an integer in the header file in any of the include files below it in the main file, as well as the main file itself. We also cannot use integers in a math expression in a function such as wait1MSec.

We are using RobotC 4.26 and this was not in an issue with Robot 3.x series
- team unlimited


:crying: :(


Sat Oct 04, 2014 6:18 pm
Profile WWW
Novice

Joined: Tue Dec 11, 2012 9:19 pm
Posts: 58
Post Re: cant reference integer from header file
You might get a better response if you provided a complete code example
showing what your problem is.


Wed Oct 08, 2014 2:50 pm
Profile
Rookie
User avatar

Joined: Sat Aug 16, 2014 8:57 pm
Posts: 10
Location: Sharon, MA
Post Re: cant reference integer from header file
In RobotC 3.x, you were able to have a global header file with a .h extension (Ex: AutonomousHeaders.c) and have an integer that you can reference in any other file that is included below it in the main file. If we do #include "AutonomousHeaders.h" in the main file, which contains an integer (Ex: int moveValue), and have another include below it (Ex: #include "moveFunctions.c"), if I reference moveValue from AutonomousHeaders.h in moveFunction.c, RobotC 4.26 will give me an error for it when compiling, but this did not happen in RobotC 3.x.

-Team Unlimited


Sat Nov 01, 2014 5:41 pm
Profile WWW
Rookie
User avatar

Joined: Sat Aug 16, 2014 8:57 pm
Posts: 10
Location: Sharon, MA
Post Re: cant reference integer from header file
Never mind. Our team figured out that since our integer was called delay, it was not working when we referenced it from a header file because the new RobotC 4.x series has a built in function or char called delay that is identified if you use that name. So, we just changed the name to something else, and it worked.

Thank you,
Team Unlimited


Sat Nov 08, 2014 3:25 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.