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.

External functions (UDFs)<br />

Description: Returns the ASCII code of the character passed in.<br />

Result type: INTEGER<br />

Syntax:<br />

ascii_val (ch)<br />

Declaration:<br />

DECLARE EXTERNAL FUNCTION ascii_val<br />

CHAR(1)<br />

RETURNS INTEGER BY VALUE<br />

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

Caution<br />

Library: ib_udf<br />

Added in: IB<br />

Because CHAR fields are padded with spaces, an empty string argument will be seen as a space, and yield a<br />

result of 32. The internal function ASCII_VAL returns 0 in this case.<br />

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

Description: Returns the arc sine of the argument.<br />

Result type: DOUBLE PRECISION<br />

Syntax:<br />

asin (number)<br />

Declaration:<br />

asin<br />

DECLARE EXTERNAL FUNCTION asin<br />

DOUBLE PRECISION<br />

RETURNS DOUBLE PRECISION BY VALUE<br />

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

Library: ib_udf<br />

Added in: IB<br />

atan<br />

170

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

Saved successfully!

Ooh no, something went wrong!