21.10.2013 Views

Firebird 2.1 Language Reference Update

Firebird 2.1 Language Reference Update

Firebird 2.1 Language Reference Update

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 13<br />

External functions (UDFs)<br />

External functions must be “declared” (made known) to the database before they can be used. <strong>Firebird</strong> ships<br />

with two external function libraries:<br />

• ib_udf – inherited from InterBase;<br />

• fbudf – a new library using descriptors, present as from <strong>Firebird</strong> 1.0 (Windows) and 1.5 (Linux).<br />

Users can also create their own UDF libraries or acquire them from third parties.<br />

Library: ib_udf<br />

Added in: IB<br />

Better alternative: Internal function ABS()<br />

abs<br />

Description: Returns the absolute value of the argument.<br />

Result type: DOUBLE PRECISION<br />

Syntax:<br />

abs (number)<br />

Declaration:<br />

DECLARE EXTERNAL FUNCTION abs<br />

DOUBLE PRECISION<br />

RETURNS DOUBLE PRECISION BY VALUE<br />

ENTRY_POINT 'IB_UDF_abs' MODULE_NAME 'ib_udf'<br />

Library: ib_udf<br />

Added in: IB<br />

Better alternative: Internal function ACOS()<br />

acos<br />

164

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!