Use

The USE command selects the current device for READs (input) and WRITEs (output).

The format of the USE command is:

	U[SE][:tvexpr] expr[:(keyword[=expr][:...])][,...]
	

The intrinsic special variable $IO identifies the current device, so GT.M directs all READs and WRITEs to $IO. When a GT.M image starts, $PRINCIPAL is implicitly OPENed and USEd. Once the GT.M image USEs a device, $IO holds the name of that device until the next USE command.

A USE command modifies the device in accordance with the deviceparameters that apply to the device type and ignores those that do not apply. Characteristics set with USE deviceparameters persist until another USE for the same device with the corresponding deviceparameter. Characteristics persist through USEs of other devices and, except for Files-11 RMS devices, through a subsequent CLOSE and re-OPEN.

Example:

	USE $P:(X=0:Y=$Y-1:NOECHO)
	

This example USEs the principal device. If that device is a terminal, the deviceparameters turn off echo and position the cursor to the beginning of the previous line.