CHAR statement

The char statement is used to define one or more variables and arrays of type char. The char statement behaves in the same way as the int statement, the only exception being that it reserves 8 bit memory locations instead of 16 bit memory locations. 8 bit variables of type char are unsigned variables and can be used to store numbers in the range 0 to 255.

BEWARE: like the int statement, the char statement is used to define both local and global variables depending on the context in which it is used.

e.g.
	char	var1
	char	var1, var99[10], var3
Arrays of chars are often used to store text. Such arrays are sometimes refered to as strings. When using a char array as a string the programmer must make some provision for either marking the end of the string with a special character or keeping the length of the string somewhere. A good end of string marker is the value 0 (also refered to as NUL in the ASCII character set). Alternately a good place to record the length of a string is in the first character position of the string (this would allow us to store strings of a minimum of zero characters and a maximum of 255 characters). Either uses an end marker or a length, do not use both and stick with the system you've chosen, don't switch between the two. The authors of XCSB prefer the NUL end marker solution.