Description

Converts the numeric value of an expression to its corresponding ASCII character string value.

Syntax

value = Char (expression)

Parameters

The Char function has the following parameters.

ParameterDescription
ExpressionChar requires that the value of expression be an integer within the range 0 to 255.

Char will be compiled as a special load instruction, if the Char expression is an integer constant. This instruction generates less object code, and is executed much faster. In the following example, Char assigns a field mark to the field_mark variable.

field_mark = Char(254)

See also

Seq()

Example

/* In the following example, percent is assigned the
ASCII string value of the % symbol (decimal 37). */
percent = Char(37)
 
 
/* The following example shows two ways to specify a carriage return/line feed */
CRLF = Char(13): Char(10)    ;* decimal
CRLF = \0D0A\                ;* hex
  • No labels