Show the content of a file on the console, printer or file
TYPE <xcFile> [TO PRINTER] [TO FILE <xcDestFile>]
<xcFile> is a name of the file to display. If the file have an extension, it must be specified (there is no default value). It can be specified as literal file name or as a character expression enclosed in parentheses.
TO PRINTER is an optional keyword that specifies that the output should go to both the screen and printer.
TO FILE <xcDestFile> copy the source <xcFile> also to a file. If no extension is given (.txt) is added to the output file name. <xcDestFile> can be specified as literal file name or as a character expression enclosed in parentheses.
TYPE command type the content of a text file on the screen with an option to send this information also to the printer or to an alternate file. The file is displayed as is without any headings or formatting.
If <xcFile> contain no path, TYPE try to find the file first in the SET DEFAULT directory and then in search all of the SET PATH directories. If <xcFile> can not be found a run-time error occur.
If <xcDestFile> contain no path it is created in the SET DEFAULT directory.
Use SET CONSOLE OFF to suppress screen output. You can pause the output using Ctrl-S, press any key to resume.
The following examples assume a file name mytext.dat exist in all specified paths, a run-time error would displayed if it does not // display mytext.dat file on screen TYPE mytext.dat // display mytext.dat file on screen and printer TYPE mytext.dat TO PRINTER // display mytext.dat file on printer only SET CONSOLE OFF TYPE mytext.dat TO PRINTER SET CONSOLE ON // display mytext.dat file on screen and into a file myreport.txt TYPE mytext.dat TO FILE MyReport
COPY FILE, SET DEFAULT, SET PATH, SET PRINTER, __TypeFile()