Convert a character to its ASCII value

     ASC(<cExp>) --> nCode


     <cExp> is the character expression to be converted to a number.


     ASC() returns an integer numeric value in the range of zero to 255,
     representing the ASCII value of <cExp>.


     ASC() is a character conversion function that returns the ASCII value of the
     leftmost character in a character string.  ASC() is used primarily on
     expressions requiring numeric calculations on the ASCII value of a
     character.  CHR() and ASC() are inverse functions.


     .  These examples illustrate various results of ASC():

        ? ASC("A")                     // Result: 65
        ? ASC("Apple")                 // Result: 65
        ? ASC("a")                     // Result: 97
        ? ASC("Z") - ASC("A")          // Result: 25
        ? ASC("")                      // Result: 0

 Files   Library is CLIPPER.LIB.

See Also: CHR() INKEY() STR() VAL()


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.