>
> Function overload is not present in C.  In C, either use different names
or
> pass a union of supported types (with additional identifier that give
hints
> of the type to be used).
>
> HTH
> Shyan
>
>

Ah, I disagree. I think C supports function overload. As an example, take
the fcntl function in Linux API. That C-pure POSIX-standard function, used
for locking files, is declared as follows:

#include <unistd.h>
#include <fcntl.h>
int fcntl(int fd, int cmd);
int fcntl(int fd, int cmd, long arg);
int fcntl(int fd, int cmd, struct flock* lock);

I think that is function overloaded. I'm I missing something?

Regards,
Fernando.


> > -----Original Message-----
> > From: Fernando Arturo G�mez Flores
[mailto:[EMAIL PROTECTED]
> > Sent: Thursday, December 16, 2004 11:51 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: (PT) How to implement polymorphism using C language
> >
> >
> > **************************************************
> > I think the only polymorphical thing you can do in C is a function
> > overload...
> >
> > void function();
> > void function(int);
> > void function(int, long, char*);
> >
> > and so, ad infinitum.
> >
> > Regards,
> >
> > Fernando.
> >
>
>
>
>
> To unsubscribe : [EMAIL PROTECTED]
>
>
>
>
>
> ---------------------------------
>
>
> Do you Yahoo!?
> Take Yahoo! Mail with you! Get it on your mobile phone.
>
> To unsubscribe : [EMAIL PROTECTED]
>
>
>
>
>
>
>
> ---------------------------------
> Note:
> This message is for the named person's use only.  It may contain
confidential, proprietary or legally privileged information.  No
confidentiality or privilege is waived or lost by any mistransmission.  If
you receive this message in error, please immediately delete it and all
copies of it from your system, destroy any hard copies of it and notify the
sender.  You must not, directly or indirectly, use, disclose, distribute,
print, or copy any part of this message if you are not the intended
recipient. MINDTECK (INDIA) LTD and any of its subsidiaries each reserve the
right to monitor all e-mail communications through its networks.
> Any views expressed in this message are those of the individual sender,
except where the message states otherwise and the sender is authorized to
state them to be the views of any such entity.
>
> Thank You.
>
>
> ---------------------------------
>
>
> To unsubscribe : [EMAIL PROTECTED]
>
>
>
>
> Yahoo! Groups SponsorADVERTISEMENT
>
>
> ---------------------------------
> Yahoo! Groups Links
>
>    To visit your group on the web, go to:
> http://groups.yahoo.com/group/Programmers-Town/
>
>    To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
>
>    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
>
>
> ---------------------------------
> Do you Yahoo!?
>  Yahoo! Mail - You care about security. So do we.







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/EbFolB/TM
--------------------------------------------------------------------~-> 

To unsubscribe : [EMAIL PROTECTED]

 
Yahoo! Groups Links

<*> To reply to this message, go to:
    
http://groups.yahoo.com/group/Programmers-Town/post?act=reply&messageNum=4921
    Please do not reply to this message via email. More information here:
    http://help.yahoo.com/help/us/groups/messages/messages-23.html

<*> To visit your group on the web, go to:  
    http://groups.yahoo.com/group/Programmers-Town/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to