Reset Procedure

Applies to TestComplete 15.47, last modified on January 20, 2023

The Reset procedure opens an existing file for reading.

Declaration

Reset(FileVarRecSize) Parameters
FileVar [in] Required Variant
RecSize [in] Optional Integer
Result     None  

Description

Opens an existing file associated with the file variable for reading. If the file is already open, it is closed and a new one is opened. The file pointer is set at the beginning of the file. If the specified file does not exist, an error occurs.

Parameters

The procedure has the following parameter:

FileVar

Specifies the file variable, which is associated with an external file by calling the AssignFile procedure.

RecSize

Specifies the record size (in bytes) to be used for data transfer.

Note: The RecSize parameter can be specified only for binary files. If this parameter is specified for a text file, an error occurs. If the parameter is omitted for a binary file, it is opened as a text file.

Remarks

After executing the Reset procedure, the EOF function returns True if the file is empty. Else, it returns False.

See Also

DelphiScript Routines
Append
AssignFile
CloseFile
EOF
Rewrite

Highlight search results