In C, what does a word preceded by two underscores mean? I've seen this used for starting inline Assembly code and I've also seen __BEGIN_DECLS and __END_DECLS in standard header files. What are these directives used for, generally speaking?
1 reply to this topic
#1
Posted 07 September 2011 - 07:56 PM
Programming is a journey, not a destination.
|
|
|
#2
Posted 07 September 2011 - 08:23 PM
In a general (only recommended) effort to keep names from collision, single underscores denote library identifiers, i.e.
Two underscores (at least put in paper in ISO:14882:'98 C++), even in any part of the identifier, denotes a vendor defined identifier.
Alexander.
_exit(0); _internal_foo(2);
Two underscores (at least put in paper in ISO:14882:'98 C++), even in any part of the identifier, denotes a vendor defined identifier.
__FILE__ __LINUX__ __CLR_VER (vendor as MSVC) __FGETS_UNLOCKED (vendor as gcc)
Alexander.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









