Equinox Online Help - Language Reference - A to Z
Asc |
|
---|---|
Applies to | |
Syntax | Asc(StringExpression) |
Action | [Function] Returns the ASCII value of the first character in a string. |
Scope | Usable anywhere. |
Notes | This function returns a number (ASCII code) for the first character in the argument, StringExpression. If StringExpression does not contain any characters then -1 is returned. |
Category | Conversions |
See Also | Card, HexNum, HexStr, Lowercase, Ord, Str, StrCase, StrDate, StrTime, Uppercase |
Example | This example displays the number 65, on a dialog. Alert Asc("A") The ASCII value of the character "1" is 49. The next example prints "49 50 51 52" in the Print window. number i This final example encrypts the string AMessage by converting A's to B's, B's to C's etc So "Hello" would become "Ifmmp". for i = 1 to Len(AMessage)AMessage[i] = Chr(Asc(AMessage[i]) + 1)next |