Topic complex |
Text functions |
Function |
reset() |
Short |
Opens a text file to read |
Syntax |
RESET(path : STRING [; mode : INTEGER]) : INTEGER |
Parameter |
path : path of the text file
mode: 0 -> ANSI
1 -> ASCII (default)
If path starts with "ramtext:...", a ramtext is opened |
Return |
handle of a text file if exists
otherwise 0 |
See also: |
|
Description |
If error handling of the system has not been deactivated explicitly (.ec 1), the programm terminates if the requested file could not be opened.
In later applications the parameter mode should always be defined, because soon the default value will be 0 (text is in ANSI character set).
After .ec 1 the result is 0 if such an error occurs. The error code can be caught with TDB_LastError.
Attention: Read never from text handle 0, because this responds the console. Under CGI conditions it holds the programm!
|