ASC()

 

Syntax:

Then: a = ASC(n)

Then: a = ASC(exp)

 

To return any character other than the first, use MID with ASC:

 

       Then: asc(mid(f, "s", "1" ))

 

"mid" is the MID command

"f" is the field number or letter(s)

"s" is the character to convert (the starting position)

"1" is the number of characters to convert (only one is allowed)

ASC can be used on all processing tables.

 

Version Ref:  3.x

Description:

Converts character to ASCII code.

 

Examples:

In a non-filePro Plus file, you wanted to perform one operation if the first character of the non-filePro Plus field 7 is a NULL (ASCII 0), and something else if it is CTRL A (ASCII 1). Write the tests as follows:

         If: asc(7) eq "0"

       Then: [do one thing]

         If: asc(7) eq "1"

       Then: [do something else]