Progress
Report Builder
User’s Guide


ASC

Converts a character expression representing a single character into the corresponding ASCII (or internal character set) integer value.

SYNTAX

ASC ( expression ) 

expression

A constant, field name, or expression with a value of a single character that you want to convert to an ASCII value. If expression is a constant, you must enclose it in quotation marks (“ “). If the value of expression is other than a single character, ASC returns the value -1.

EXAMPLE

To convert the first character of a state (State) to its numeric value, create the expression:

ASC(SUBSTRING (State, 1, 1)) 

If the value of State is MA, then ASC returns the numeric value of the letter M, which is 77 (decimal).


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095