Show / Hide Table of Contents

Char


String Function

The Char function returns the ASCII character for the number that the expression evaluates to. This function is most useful for outputting ASCII characters that cannot be typed, such as accented characters. This function is most often used in conjunction with a string expression and the concatenation (’$’) operator.

Syntax

Char(<expression>)

Syntax Example

Char(10)

Parameters

<expression>

Any expression that evaluates to a number between 0 and 255. The expression is evaluated every time the Char function is encountered.

Parameters Example

The following example displays the ASCII character for the number 50 when an Entity enters the Truck Location.

Display Char(50)

Char Example 1


Char Example 2

Remarks

The number corresponding to the ASCII character varies with each computer depending on the character set specified in your device's config.sys file. To determine your device's ASCII character number, run the model CHAR.MOD found in the MODELS\REFS directory. You can view the CHAR.TXT file this model generates in the same directory as the model.

In This Article
Back to top Generated by DocFX