DataBasic Reference > Statements and Intrinsic Functions > C > CHAR Function

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

RealityV15.1Online Documentation (MoTW) Revision 7

CHAR Function (DataBasic) (m618703+char_f.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

CHAR Function

Converts a decimal value to the corresponding ASCII or multi-byte character.

Syntax

CHAR(charValue{, charSize})

Syntax Elements

charValue An expression that evaluates to an integer value, specifying the decimal value of the required character.

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

Return Value

The character with the code charValue.

Comments

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

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

CHAR is the inverse of the SEQ function.

Examples

VM = CHAR(253)

Assigns the string value of a value mark to variable VM.

X = 252
SVM = CHAR(X)

Assigns the ASCII string value for a subvalue mark to variable SVM.

RealityV15.1 (MoTW) Revision 7Comment on this topic