Wikia

Petit Computer Wiki

CHR$ (function)

Comments0
240pages on
this wiki

CHR$(number) returns a single-character string, determined by number (after it has been rounded down, if it is a noninteger).

When number is between 32 and 126 inclusive, CHR$(number) gives the character indexed by that number in the ASCII table, except for CHR$(92), which gives the Yen symbol (¥). (ASCII character 92 is the backslash, which you can get from CHR$(127).)

When number is any other value between 0 and 255 inclusive, the character given is one of the other symbols available, determined by SmileBoom (see the Character table).

If number is any other value, the system generates an error Out of range (CHR$).

The opposite of CHR$ is ASC; the result of ASC(CHR$(A)) is A (as long as it's an integer between 0 and 255 inclusive), and the result of CHR$(ASC(A$)) is the first character of A$ (as long as it's not empty).

Advertisement | Your ad here

Photos

Add a Photo
441photos on this wiki
See all photos >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki