CHARS Function

Converts numeric values in a dynamic array to the corresponding ASCII or multi-byte characters.

Syntax

CHARS(dynArray{, charSize})

Syntax Elements

dynArray A DataBasic expression that evaluates to a dynamic array.

charSize Optional. A positive integer in the range 1 to 6, specifying the size of each character (default, 1). This parameter is intended for future use with multi-byte characters.

Return Value

A dynamic array with the same structure as dynArray, but with each numeric value replaced by the corresponding ASCII or multi-byte character.

Note

Comments

Reality does not currently support multi-byte characters; however, CHARS may be used for decimal to binary conversions, where charSize is the number of bytes in the binary fields generated.

If the value of an element is greater than 256charSize, it is divided by 256charSize and the remainder is used.

CHARS is the inverse of the SEQS function.

Example

ARY = 82:@VM:101:@VM:97:@VM:108:@VM:105:@VM:116:@VM:121
NEWARY = CHARS(ARY)

Sets NEWARY to "RVMeVMaVMlVMiVMtVMy".