View unanswered posts | View active topics It is currently Sun Aug 02, 2015 2:42 am






Reply to topic  [ 2 posts ] 
Is there #pragma once 
Author Message
Rookie

Joined: Sat Jul 04, 2015 2:08 pm
Posts: 1
Post Is there #pragma once
In compilers like GCC, you can use #pragma once

Is there such a thing in RobotC?


Sat Jul 04, 2015 2:10 pm
Profile
Site Admin
Site Admin
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3569
Location: Rotterdam, The Netherlands
Post Re: Is there #pragma once
No, there is not. What I tend to do is this:
Code:
#ifndef __INCLUDE_FILE_NAME_H__
#define __INCLUDE_FILE_NAME_H__

void some_func();
void another_func();

void some_func()
{
  // do something super useful
  return;
}

void another_func()
{
  // do something useful
  return;
}

#endif // __INCLUDE_FILE_NAME_H__

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Tue Jul 07, 2015 1:24 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 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:  
cron



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