HTBasic Help
×
Menu
Index

PRINTALL IS

Assigns a logging device for operator interaction and error messages.
 
 PRINTALL IS destination [;attributes]
 
Usage:
PRINTALL IS Centronix
PRINTALL IS PRT;EOL CHR$(10) & CHR$(13) DELAY .5
PRINTALL IS Dev;WIDTH 120,EOL A$ END
 
Example: PRINTALL IS.BAS
 
Description:
PRINTALL IS defines where to send output from print-all mode. When print-all mode is on, all messages output to the screen (including output area, DISP line, keyboard line and message line) are also output to the PRINTALL device. When print-all mode is off, output appears only in the normal places, and no information is sent to the PRINTALL target. The PRINTALL device is the CRT after start-up and SCRATCH A.
 
The print-all mode is toggled between on and off each time the PRT ALL key is pressed. STATUS(KBD,1) returns a 1 if print-all mode is on and 0 if it is off. A program can turn print-all mode on with CONTROL KBD,1;1 and off with CONTROL KBD,1;0.
 
Print-all is a powerful debugging tool. Use it in connection with TRACE to print TRACE messages about program execution. Also, certain error conditions can produce more than one line of output. Only the last message is visible on the message line. With print-all on, all the messages can be read on the PRINTALL device.
 

Destinations

The output can be sent to a device (usually a printer) or file. If the destination is a file, it must be an existing regular file or a BDAT file.
Sent to a printer, PRINTALL allows permanent logging of output.
 

Attributes

The EOL attribute specifies a new end-of-line string of up to eight characters. The END attribute specifies an EOL to be sent with the last character of the EOL string. The DELAY attribute specifies a time to wait after sending the EOL string and before continuing with program execution. The delay is in seconds and should be in the range 0.001 to 32.767 but is rounded to the timing resolution of the computer. The OFF attribute returns the EOL string to the default CR/LF, no EOL and no DELAY.
 
The WIDTH attribute specifies the maximum number of characters sent to the printing device before an automatic EOL sequence is sent. If WIDTH OFF is specified, the width is set to infinity. WIDTH OFF is the default.
 
If APPEND is specified and output is to a file, the file position is moved to the end-of-file before any data is sent to the file. If APPEND is not specified, the file contents are replaced with new data.
 
See Also: