Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
I have seen function declarations that look like this
I've seen function declarations that look like this:
extern int func __((int, int));
What are those extra parentheses and underscores for?
✍: Guest
They're part of a trick which allows the prototype part of the function declaration to be turned off for a pre-ANSI compiler. Somewhere else is a conditional definition of the __ macro like this:
#ifdef __STDC__
#define __(proto) proto
#else
#define __(proto) ()
#endif
The extra parentheses in the invocation
extern int func __((int, int));
are required so that the entire prototype list (perhaps containing many commas) is treated as the single argument expected by the macro.
2015-05-23, 1869👍, 0💬
Popular Posts:
What are shared (VB.NET)/Static(C#) variables? Static/Shared classes are used when a class provides ...
How To Enter Binary Numbers in SQL Statements? - MySQL FAQs - Introduction to SQL Basics If you want...
Can you explain in GSC and VAF in function points? In GSC (General System Characteristic) there are ...
Can you prevent a class from overriding ? If you define a class as “Sealed” in C# and “NotInheritab...
How Many Tags Are Defined in HTML 4.01? There are 77 tags defined in HTML 4.01: a abbr acronym addre...