Firebird Documentation IndexFirebird 2.5 Language Ref. UpdateExternal functions (UDFs) → ascii_val
Firebird Home Firebird Home Prev: ascii_charFirebird Documentation IndexUp: External functions (UDFs)Next: 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.

Prev: ascii_charFirebird Documentation IndexUp: External functions (UDFs)Next: asin
Firebird Documentation IndexFirebird 2.5 Language Ref. UpdateExternal functions (UDFs) → ascii_val