Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / October 2007



Tip: Looking for answers? Try searching our database.

what is...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mlabs - 14 Oct 2007 01:48 GMT
the difference between..

#include

and

#import

?

TIA
Gregory Weston - 14 Oct 2007 02:43 GMT
> the difference between..
>
[quoted text clipped - 7 lines]
>
> TIA

#import is a non-standard extension that inserts the contents of the
referenced file if and only if they haven't already been inserted into
the compilation unit. It is functionally similar to doing this:

#ifndef _MY_HEADER_INCLUDED_
#define _MY_HEADER_INCLUDED_
#include "MyHeader.h"
#endif
Herb Petschauer - 14 Oct 2007 02:48 GMT
> the difference between..
>
[quoted text clipped - 7 lines]
>
> TIA

Google search "import include difference "objective C"".

Signature

To reply via email, replace "LastNameHere" with my last name.

mlabs - 14 Oct 2007 03:43 GMT
thanks Gregory & Herb... makes sense . sort of like #pragma once ...
on windows...

A
Gregory Weston - 14 Oct 2007 17:21 GMT
> thanks Gregory & Herb... makes sense . sort of like #pragma once ...
> on windows...

And at least a few Mac compilers I've used in the last 20 years. I
almost made a specific reference to #pragma once, but I wasn't sure how
widely that was implemented. So I went with the standard/portable
illustration only.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.