Subject Re: [firebird-support] UDF
Author Josef KokeŇ°
> Hello, this is related to my previous post... I'm trying to write a UDF
> in Delphi... It's declared like this:
>
> function Descuentos(var Suma:currency;Descuentos:pchar):double; cdecl;
> export;
>
> DECLARE EXTERNAL FUNCTION SG_DES
> DOUBLE PRECISION,
> CSTRING(50)
> RETURNS DOUBLE PRECISION BY VALUE
> ENTRY_POINT 'Descuentos' MODULE_NAME 'SGUDF';

Delphi type Currency is not the same thing as Firebird type DOUBLE
PRECISION. Change the Delphi declaration to:

function Descuentos(var Suma:double;Descuentos:pchar):double; cdecl; export;

Pepak