CHR$()

From Liberty BASIC Family
Revision as of 14:25, 14 September 2020 by StPendl (talk | contribs) (Text replacement - "Building Blocks Categories" to "Building Blocks")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 asc( valueOfChar )     ' Produces A
    end

Useful Procedures

' Place a useful function or sub using this keyword here