<< ascii_char | FB 2.5 Language Reference | asin >>
<< ascii_char | FB 2.1 Language Reference | asin >>

ascii_val

Library: ib_udf

Added in: IB

Better alternative: Internal function ASCII_VAL()

Description

Returns the ASCII code of the character passed in.

Result type: INTEGER

Syntax

 ascii_val (ch)

Declaration

 DECLARE EXTERNAL FUNCTION ascii_val
   CHAR(1)
   RETURNS INTEGER BY VALUE
   ENTRY_POINT 'IB_UDF_ascii_val' MODULE_NAME 'ib_udf'

Caution: Because CHAR fields are padded with spaces, an empty string argument will be seen as a space, and yield a result of 32. The internal function ASCII_VAL returns 0 in this case.

back to top of page
<< ascii_char | FB 2.5 Language Reference | asin >>
<< ascii_char | FB 2.1 Language Reference | asin >>