TYPE

Display the contents of a text file

Syntax

      TYPE <xcFile> [TO PRINTER] [TO FILE <xcOutFile>]

Arguments

<xcFile> is the name of the file, including extension, to be displayed to the screen. This argument may be specified as a literal file name or as a character expression enclosed in parentheses. <xcFile> must be specified with an extension if it has one.

TO PRINTER echoes the display to the printer.

TO FILE <xcOutFile> echoes the display to the specified file. <xcOutFile> may be specified either as a literal file name or as a character expression enclosed in parentheses. If no extension is specified, .txt is added.

Description

TYPE is a console command that displays the contents of a text file to the screen, optionally echoing the display to the printer and/or another text file. To suppress output to the screen while printing or echoing output to a file, SET CONSOLE OFF before the TYPE invocation.

If <xcFile> is specified without a path and/or drive designator, TYPE searches the current DEFAULT directory, and then, the current PATH. If <xcOutFile> is specified without a path and/or drive designator, TYPE creates the file in the current DEFAULT directory.

TYPE performs no special formatting on the listing. There are no special headings or pagination when the output is sent to the printer.

To pause output, use Ctrl-S. Note that you cannot interrupt a listing with Esc.

Examples

      .  This example illustrates the TYPE command:

      TYPE Main.prg TO PRINTER

Seealso

COPY FILE, SET DEFAULT, SET PATH, SET PRINTER

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s