Chr$: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
(edit)
 
No edit summary
Line 1: Line 1:
The '''CHR$'''(X) internal function returns the [[ASCII]] '''character''' represented by X, which may have a decimal value from 0 to 255.
The '''CHR$'''(X) internal function returns the [[ASCII]] '''character''' represented by X, which may have an integer value from 0 to 255.


===Comments and Examples===
===Comments and Examples===

Revision as of 14:21, 17 January 2012

The CHR$(X) internal function returns the ASCII character represented by X, which may have an integer 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.