READ * Command

The READ * command reads one character from the current device and returns the decimal ASCII representation of that character into the variable specified for the READ * command. READ * appears most frequently in communication protocols, or in interactive programs where single character answers are appropriate.

The following example reads the value "A", and returns the decimal ASCII representation of "A" in the variable X.

Example:

	GTM> READ *X
	A
	GTM> WRITE X
	65
	

If a timeout occurs before GT.M reads a character, the READ * returns a negative one (-1) in the variable.