Chr$

From BR Wiki
Revision as of 13:27, 12 January 2012 by Mikhail.zheleznov (talk | contribs) (edit)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The CHR$(X) internal function returns the ASCII character represented by X, which may have a decimal value from 0 to 255.

Comments and Examples

Chr$ is often used to send special characters to control a printer or screen. Chr$(27) generates the same ASCII character as the Esc key.

Related Functions

Inverse function is Ord(A$). Hex$ function can send several special codes in one function call.

Technical Considerations

  1. If the parameter value is greater than 255, only the low order byte will be used. Thus, CHR$(65) and CHR$(65+256) both will print the letter A.