Firebird Documentation Index → Firebird 2.1 Language Ref. Update → External functions (UDFs) → 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'
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.
Firebird Documentation Index → Firebird 2.1 Language Ref. Update → External functions (UDFs) → ascii_val |