overload don't work for cdecl

General discussion for topics related to the FreeBASIC project or its community.
Post Reply
aloberoger
Posts: 507
Joined: Jan 13, 2009 19:23

overload don't work for cdecl

Post by aloberoger »

it seem that the keyword overload don't work for cdel declaration
example;
declare function dothis cdecl overload(count as integer ,...) as double
declare function dothis cdecl overload(s as string, count as integer ,...) as double
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: overload don't work for cdecl

Post by caseih »

Edit: comment removed, as it was wrong.
Last edited by caseih on May 15, 2016 22:04, edited 1 time in total.
dkl
Site Admin
Posts: 3235
Joined: Jul 28, 2005 14:45
Location: Germany

Re: overload don't work for cdecl

Post by dkl »

It works after removing the ... vararg parameters; currently overload doesn't work with varargs.
fxm
Moderator
Posts: 12131
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: overload don't work for cdecl

Post by fxm »

This is well noted at page ... (Ellipsis), but not at page OVERLOAD.
I'll fix it.

[edit]
Done.
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: overload don't work for cdecl

Post by caseih »

I'm curious as to why FB can allow overloading of non-variadic functions but not varadic ones, especially in cases when enough of the parameter types are provided to make a unique signature? What brings about the limitation?
dkl
Site Admin
Posts: 3235
Joined: Jul 28, 2005 14:45
Location: Germany

Re: overload don't work for cdecl

Post by dkl »

I don't think there's a technical reason; in other words, it could be implemented.
counting_pine
Site Admin
Posts: 6323
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: overload don't work for cdecl

Post by counting_pine »

I can't readily predict the effect it would have on overload resolution..
Post Reply