ASC( ) Function Example

The following example displays the characters A through J and uses ASC( ) to display their corresponding ANSI values.

STORE 'ABCDEFGHIJ' TO gcANSI  && 10 characters
CLEAR
FOR nCOUNT = 1 TO 10
   ? SUBSTR(gcANSI, nCount,1)  && Display a character
   ?? ASC(SUBSTR(gcANSI, nCount)) && Display ANSI value
ENDFOR