Char: Difference between revisions

From Wiki of ZZT
Jump to navigation Jump to search
(Quick intro to #char command)
 
m (Remove extra whitespace)
Line 1: Line 1:
{{DISPLAYTITLE:char}}
{{DISPLAYTITLE:char}}
'''#char''' is a [[ZZT-OOP]] command for changing an object's display character. It takes a single parameter, a decimal number from 1 to 255, representing the desired extended ASCII character.
'''#char''' is a [[ZZT-OOP]] command for changing an object's display character. It takes a single parameter, a decimal number from 1 to 255, representing the desired extended ASCII character.


Note that #char does not allow character 0 as a parameter, even though it is a valid extended ASCII character. Running <code>#char 0</code> will silently fail without changing the object's character. This restriction does not typically matter in practice because characters 32 and 255 are usually visually identical to character 0.
Note that #char does not allow character 0 as a parameter, even though it is a valid extended ASCII character. Running <code>#char 0</code> will silently fail without changing the object's character. This restriction does not typically matter in practice because characters 32 and 255 are usually visually identical to character 0.

Revision as of 06:28, 18 January 2021

#char is a ZZT-OOP command for changing an object's display character. It takes a single parameter, a decimal number from 1 to 255, representing the desired extended ASCII character.

Note that #char does not allow character 0 as a parameter, even though it is a valid extended ASCII character. Running #char 0 will silently fail without changing the object's character. This restriction does not typically matter in practice because characters 32 and 255 are usually visually identical to character 0.