# CHARS

Updated: 11/30/2021, 7:00:45 PM
Created: 11/30/2021, 7:00:45 PM
Last Updated By: Jake Tuttle
Read Time: 1 minute(s)

# Description

The CHARS function accepts a dynamic array of numeric expressions as an argument and returns a dynamic array of corresponding ASCII characters. It takes the general form:

CHARS(DynArr)
1

Where each element of DynArr must evaluate to a numeric argument in the range 0-255. If any of the dynamic array elements are non-numeric, a run-time error will occur.

    dyn1 = 58 : @AM : 45 : @AM : 41
    dyn2 = CHARS (dyn1)
    CRT "Contents of array -> " :
    FOR index = 1 TO 3
        CRT dyn2<index> :
    NEXT index
1
2
3
4
5
6

which results in the output of the following emoticon:

Contents of array -> :-)
1

See also: CHAR.

Go back to jBASE BASIC

Go back to Programmers' Reference Guide