Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipOn 3.0 Reference - c_filecntz() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 C_FILECNTZ()

 DESCRIPTION

 C_FILECNTZ() adds a new-line and end-of-file (EOF) marker to the
 specified DOS text file if it does not already have one.
 C_FILECNTZ() will convert a file for file viewing utilities and
 functions such as C_VIEW() that use the EOF marker.

 NOTES

 The file must be closed before calling this function.

 SYNTAX

 C_FILECNTZ(file [,network])

 PARAMETERS

 file (C) is the name of the DOS text file to convert.  The contents
 of the file remain unchanged, except for the addition of a new-line
 character and end-of-file marker at the end of the file.  The
 complete file, including extension, must be specified.  A drive and
 directory name may also be supplied with the file name or if not
 supplied with default to the current directory.

 network (L) indicates whether or not the program is running on a
 network.  If the program is running on a network pass true (.T.) so
 the file can be opened with the proper share access, otherwise pass
 false (.F.).  If network is not specified, the default of false
 (.F.) is used.

 RETURNS

 C_FILECNTZ() returns a numeric status code as follows:

 CODE     DESCRIPTION
 ----     -----------
 0        Successful conversion.
 1        File already has EOF marker, not changed.
 2        File not found.
 3        Error writing to file

 EXAMPLES

 set print on
 set device to print          && set output to printer
 set printer to report.txt    && redirect to file

 ** DO REPORT PROCEDURE
 set printer to               && close report file
 set print off
 set device to screen

 if c_filecntz("report.txt") > 1
   ? "Error converted file report.txt"
 endif
 c_view(0,0,24,79,"report.txt")


See Also: C_VIEW() C_VIEWSTR() C_FILEWRITE()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson