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.

Notes:<br />

External functions (UDFs)<br />

which is correct. Without the NULL keyword (your only option in pre-2.0 versions), NULL is passed<br />

to the function as an empty string and the result is an empty string as well.<br />

For more information about passing NULLs to UDFs, see the note at the end of this book.<br />

• Depending on how you declare it (see CSTRING note), this function can accept and return strings of up to<br />

32767 characters.<br />

• Before <strong>Firebird</strong> 2.0, the result type was CHAR(n).<br />

• In <strong>Firebird</strong> 1.5.1 and below, the default declaration used CSTRING(80) instead of CSTRING(255).<br />

Tip<br />

Library: ib_udf<br />

Added in: IB<br />

<strong>Firebird</strong> 1.0 has also implemented the internal SQL function SUBSTRING, effectively rendering substrlen<br />

obsolete in the same version in which it was introduced. SUBSTRING also supports multi-byte character sets.<br />

In new code, use SUBSTRING.<br />

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

tan<br />

Description: Returns an angle's tangent. The argument must be given in radians.<br />

Result type: DOUBLE PRECISION<br />

Syntax:<br />

tan (angle)<br />

Declaration:<br />

DECLARE EXTERNAL FUNCTION tan<br />

DOUBLE PRECISION<br />

RETURNS DOUBLE PRECISION BY VALUE<br />

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

Library: ib_udf<br />

Added in: IB<br />

tanh<br />

194

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

Saved successfully!

Ooh no, something went wrong!