CHR$()

From Liberty BASIC Family
Jump to navigation Jump to search
Supported in Just BASIC Supported in Liberty BASIC Supported in Liberty BASIC 5 Not supported in Run BASIC

Description

CHR$(n) returns a string of the one character that is represented by the ASCII value n, where n=0 - 255.

Syntax

  1. chr$(0 - 255)

Hints

Inverse function: To find the ASCII value of the character, use the ASC() function.
Only ASCII values between 33 - 255 are printable characters.
Value 32 represents space. Values 0 - 31 are non-printable control and formatting characters.

Example

' Using a literal number
    print chr$(65)               ' Produces A

' Using a numeric variable
    valueOfChar = 65
    print chr$( valueOfChar )     ' Produces A
    end

Useful Procedures

' Place a useful function or sub using this keyword here