From 4d495175043c399fdca6e1bb4c74ef176fc76fb4 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 6 Aug 2025 11:29:57 +0900 Subject: Replace TRUE/FALSE with boolean values true/false - part 4 Signed-off-by: Michele Calgaro --- doc/html/tqfile.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'doc/html/tqfile.html') diff --git a/doc/html/tqfile.html b/doc/html/tqfile.html index ff845a39c..b4e97f799 100644 --- a/doc/html/tqfile.html +++ b/doc/html/tqfile.html @@ -100,7 +100,7 @@ and write with writeBlock(). TQFile als

The size of the file is returned by size(). You can get the current file position or move to a new file position using the at() functions. If you've reached the end of the file, atEnd() -returns TRUE. The file handle is returned by handle(). +returns true. The file handle is returned by handle().

Here is a code fragment that uses TQTextStream to read a text file line by line. It prints each line with a line number.

@@ -166,7 +166,7 @@ Destroys a TQFile. Calls close().
 
 

bool TQFile::atEnd () const [virtual]

-Returns TRUE if the end of file has been reached; otherwise returns FALSE. +Returns true if the end of file has been reached; otherwise returns false. If TQFile has not been open()'d, then the behavior is undefined.

See also size(). @@ -238,14 +238,14 @@ should translate it first, for example:

bool TQFile::exists ( const TQString & fileName ) [static]

-Returns TRUE if the file given by fileName exists; otherwise -returns FALSE. +Returns true if the file given by fileName exists; otherwise +returns false.

Examples: chart/chartform.cpp, dirview/dirview.cpp, and helpviewer/helpwindow.cpp.

bool TQFile::exists () const

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

Returns TRUE if this file exists; otherwise returns FALSE. +

Returns true if this file exists; otherwise returns false.

See also name().

void TQFile::flush () [virtual] @@ -281,7 +281,7 @@ can be used with TQSocketNotifier as well.

bool TQFile::open ( int m ) [virtual]

Opens the file specified by the file name currently set, using the -mode m. Returns TRUE if successful, otherwise FALSE. +mode m. Returns true if successful, otherwise false.

The mode parameter m must be a combination of the following flags:

@@ -342,7 +342,7 @@ is specified, it is created. This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Opens a file in the mode m using an existing file handle f. -Returns TRUE if successful, otherwise FALSE. +Returns true if successful, otherwise false.

Example:

     #include <stdio.h>
@@ -367,7 +367,7 @@ information.
 
 This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
 

Opens a file in the mode m using an existing file descriptor f. -Returns TRUE if successful, otherwise FALSE. +Returns true if successful, otherwise false.

When a TQFile is opened using this function, close() does not actually close the file.

The TQFile that is opened using this function, is automatically set to be in @@ -420,14 +420,14 @@ flag.

bool TQFile::remove ()

Removes the file specified by the file name currently set. Returns -TRUE if successful; otherwise returns FALSE. +true if successful; otherwise returns false.

The file is closed before it is removed.

bool TQFile::remove ( const TQString & fileName ) [static]

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Removes the file fileName. -Returns TRUE if successful, otherwise FALSE. +Returns true if successful, otherwise false.

void TQFile::setDecodingFunction ( DecoderFn f ) [static]

Warning: This function is not reentrant.

-- cgit v1.2.3