ASCII( ) function

Returns the ASCII character code for a specified character.

Syntax

ASCII(character)

Parameters

character

Character. The value to identify the character code for. You can specify a quoted character, or a multiple character string, field, or expression. If you specify multiple characters, only the first character is evaluated.

Output

Numeric. Returns an integer value representing the character code corresponding to the ASCII character.

Remarks

You can use this function to test character field values when they are not printable characters, such as tabs.

This function is the inverse of the CHR( ) function.

Examples

Example Return value

ASCII("A")

65

ASCII("1")

49

Extract records that start with a tab character

To extract records that have a tab character (value = 9) at the beginning of a field called “Description”, specify the following command:

EXTRACT RECORD TO "TabEntries.TXT" IF ASCII(Description) = 9
Related reference
CHR( ) function


(C) 2013 ACL Services Ltd. All Rights Reserved. | Send feedback