Subject Re: Baffled by UDF results
Author Peter
Dimitry

The Exact Declaration and function is:
function Total(var V1,V2,V3: currency): currency; cdecl; export;

function Total(var V1,V2,V3: currency): currency;
begin
result := V1+V2+V3;
end;

Regards
Peter

--- In firebird-support@yahoogroups.com, "Dimitry Sibiryakov"
<SD@t...> wrote:
> On 15 Apr 2004 at 21:16, Peter wrote:
>
> >Example: Where input values are zero Cast(V1+V2+V3 As Numeric
(18,4))
> >predictably results in zero (or correct figure where values higher
> >than zero are entered). But a UDF "Total(var V1,V2,V3: currency):
> >currency" which simple adds and returns the value does not give
the
> >correct result.
> [skip]
> >Can someone put me straight?
>
> cdecl?
>
> SY, Dimitry Sibiryakov.