Char function

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

value = Char(expression)

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)

/* 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
  • guides/programming/programmers_reference_manual/char.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1