beautypg.com

Visara Master Console Center Scripting Guide User Manual

Page 86

background image

Chapter 5 Script Commands

Scripting Guide

86

CHR

Syntax:

CHR( %Number) ==> $String

Description:

Given an integer in the range 0 to 255, returns a string with the

single character corresponding to that ASCII value.

Action:

Assign a string value to the variable specified.

Parameters:

%Number. A numeric value from 0 to 255.

Returns:

String value, as follows:
String Value

Meaning

Empty

The ASCII value specified was 0, or
outside the range 0 to 255

Single character

The character represented by the

specified

ASCII value

Notes:

Technically, ASCII values are only in the range of 0 to 128, but some

systems (including the MCC) 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:

%Num := 66
$Character := CHR(%Num)
// The variable $Character will contain the letter B.

See Also:

ASCII