Ascii – Visara Master Console Center Scripting Guide User Manual
Page 78

Chapter 5 Script Commands
Scripting Guide
78
ASCII
Syntax:
ASCII( $String) ==> %Value
Description:
Given a string $String, returns the integer ASCII value of its first
character only, ranging from 0—255.
Action:
Assign an integer value to the variable specified.
Parameters:
$String. Normal string expression.
Returns:
Integer value. The number corresponding to the ASCII code of the first
character.
Notes:
1. A return value of zero denotes an empty (null) string.
2. Technically, ASCII values are only in the range of 0 to 128, but
some systems (including the MCC itself) use the ISO 8859 “Latin 1”
or ANSI character set, which contains values from 0 to 255. See
Appendix A ASCII Character Values for a complete list of
characters and their values.
Example:
$Name := “Alexandra”
%Code := ASCII($Name)
// Variable %Code will contain the number 65, the ASCII
// value for a capital A.
See Also: