[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 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()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson