TYPE Command

See Also

Displays the contents of a file.

Syntax

TYPE FileName1
  [AUTO]
  [WRAP]
  [TO PRINTER [PROMPT] | TO FILE FileName2]
  [NUMBER]

Arguments

FileName1

Specifies the name of the file to display. The name must include a file extension.

AUTO

Turns automatic indentation on. When you also include WRAP, TYPE automatically indents wrapped text in each paragraph by the same amount it indents the first line of the paragraph. For example:

WRAP

Enables wordwrap so that a word that is too long to fit at the end of a line is automatically moved to the next line.

TO PRINTER [PROMPT]

Directs output to the printer.

You can include the optional PROMPT clause to display a print dialog before printing starts. Place the PROMPT keyword immediately after TO PRINTER.

TO FILE FileName2

Directs output to the file specified with FileName2.

NUMBER

Places line numbers at the beginning of each line in the output.

Remarks

TYPE displays the contents of files. This display can be directed to the main Visual FoxPro window, the active user-defined window, a printer, or another file.

When SET HEADINGS is ON, Visual FoxPro inserts a formfeed, the path and name of the file, and the date at the beginning of output produced with TYPE. If SET HEADINGS is OFF, this information isn't included.

In FoxPro for MS-DOS, if a printer driver setup is loaded and you direct output from TYPE to a file or a printer, TYPE displays the file contents using the settings from the printer driver setup.