View unanswered posts | View active topics It is currently Tue Jul 22, 2014 5:47 pm






Reply to topic  [ 7 posts ] 
RobotC and header file 
Author Message
Rookie
User avatar

Joined: Sat Dec 22, 2007 1:21 pm
Posts: 11
Location: FRANCE (GRENOBLE)
Post RobotC and header file
Hello here !

I'm a beginner with RobotC soft, and I'm using the trial demo.
I begin my first code today with it and I have one question :
is it possible to make header file for my custom fonction ? or I have to put at the end of my code ? Maybe in the purchased version ?

you see what I mean ? I think it's more clear when you use header file..

However I think RobotC is a very good soft... maybe I will buy it ! I need more time :!:


Sat Dec 22, 2007 5:09 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Jan 31, 2007 3:39 am
Posts: 299
Location: San Diego, California. USA
Post 
Hello achile,

You can create a separate file for custom functions you make, I use it allot. Make a separate file and put the code in it and save it in the same folder as the main code file thats going to reference it.

Now in your main code file before task main, use the command:
#include "FileNameHere.c"

This will include the other code file with the functions in it. Its really nice to use when you want to use the same custom code for lots of different files you make, very nice for sensor drivers.

Also, the trial version of RobotC is the full version, just it will expire in 30 days.

Good luck, hope this helps. Fell free to post questions on the forum B-)
Scott

_________________
Mmmm Legos B-)

My Robot Projects:
http://www.freewebs.com/robotprojects/


Sat Dec 22, 2007 8:00 pm
Profile WWW
Rookie
User avatar

Joined: Sat Dec 22, 2007 1:21 pm
Posts: 11
Location: FRANCE (GRENOBLE)
Post 
Hello starwarslegokid !

Very good news ! The only bad remark it's that you can only open one file in the robotC's editor...
it will be great if you can open many files in the same window using "tab" like codeblocks of firefox. Specially when you are in debbuging way...maybe it's the next upgrade :?: :wink:
But ok, when I will be 100% sure of one function, I will put in header file :D

And thank you very much for your quick answer :!:

_________________
++.
I'm french, really sorry for my bad english :!:

PLAY LIST OF line follower robots


Sun Dec 23, 2007 4:45 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Jan 31, 2007 3:39 am
Posts: 299
Location: San Diego, California. USA
Post 
Yes you can open only 1 file to edit at a time, but you can include many files.

Good luck with your code
Scott B-)

_________________
Mmmm Legos B-)

My Robot Projects:
http://www.freewebs.com/robotprojects/


Sun Dec 23, 2007 11:09 pm
Profile WWW
Rookie
User avatar

Joined: Sat Dec 22, 2007 1:21 pm
Posts: 11
Location: FRANCE (GRENOBLE)
Post 
Thank you !

just for my information, are you the father of RobotC ?

_________________
++.
I'm french, really sorry for my bad english :!:

PLAY LIST OF line follower robots


Mon Dec 24, 2007 10:42 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Jan 31, 2007 3:39 am
Posts: 299
Location: San Diego, California. USA
Post 
ooh no lol, just a fellow enthusiast :-). Dick Swan is the father of RobotC.

Scott B-)

_________________
Mmmm Legos B-)

My Robot Projects:
http://www.freewebs.com/robotprojects/


Mon Dec 24, 2007 6:26 pm
Profile WWW
Rookie
User avatar

Joined: Sat Dec 22, 2007 1:21 pm
Posts: 11
Location: FRANCE (GRENOBLE)
Post 
Ok Ok :D

So, happy Christmas to you and everybody reading this topic.....

_________________
++.
I'm french, really sorry for my bad english :!:

PLAY LIST OF line follower robots


Wed Dec 26, 2007 5:17 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 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.