[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 3 different interfaces to the same C procedure?



SK>> Does overloading means having more then 1 procedure with the same name?

Three fcntl definitions mean you can omit last parameter. In fact, fcntl
is defined as extern int fcntl __P ((int __fd, int __cmd, ...));
so implementation will find and extract extra argument. Read
/usr/include/fcntl.h

As for oveloading (which is in C++) - you still cannot have 2 functions
with the same name, just in C++ argument types are part of the function
name, so foo(int) and foo(char *) are different names.
-- 
frodo@sharat.co.il	\/  There shall be counsels taken
Stanislav Malyshev	/\  Stronger than Morgul-spells
phone +972-3-9316425	/\  		JRRT LotR.
http://sharat.co.il/frodo/	whois:!SM8333



=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il