Harbour Reference Guide

 

__TYPEFILE()

Show the content of a file on the console and/or printer

Syntax

__TYPEFILE( <cFile>, [<lPrint>] ) --> NIL

Arguments

<cFile> is a name of the file to display. If the file have an extension, it must be specified (there is no default value).

<lPrint> is an optional logical value that specifies whether the output should go only to the screen (.F.) or to both the screen and printer (.T.), the default is (.F.).

Returns

__TYPEFILE() always return NIL.

Description

__TYPEFILE() function type the content of a text file on the screen with an option to send this information also to the printer. The file is displayed as is without any headings or formating.

If <cFile> contain no path, __TYPEFILE() try to find the file first in the SET DEFAULT directory and then in search all of the SET PATH directories. If <cFile> can not be found a run-time error occur.

Use SET CONSOLE OFF to suppress screen output. You can pause the output using Ctrl-S, press any key to resume.

__TYPEFILE() function is used in the preprocessing of the TYPE command.
Examples
      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
      __TYPEFILE( "MyText.DAT" )

      // display MyText.DAT file on screen and printer
      __TYPEFILE( "MyText.DAT", .T. )

      // display MyText.DAT file on printer only
      SET CONSOLE OFF
      __TYPEFILE( "MyText.DAT", .T. )
      SET CONSOLE ON
Status

Ready

Compliance

__TYPEFILE() works exactly like CA-Clipper's __TYPEFILE()

Files

Library is Rtl

See Also

 




[Source Forge]

Other Docs Categories

Advantage Database RDD
Array
Binary conversion
Classes
Code Block
Console input
Conversion
Conversion Tools
DOS
Data input and output
Database
Database Tools
Date
Dos Tools
Environment
Error recovery
Events
File management
GT
Harbour Tools
Internal
Low Level
Math
Misc
Miscellaneous
Nation
Object manipulation
Operating System Specific
Parameter Checks
String Tools
Strings
TBrowse Method
TBrowse class
Terminal
Time
Utility
Variable Management

 

Last updated on 2001/06/26