Deutsch English
Alphabetical index
Array functions
CGI functions
Data types
Date functions
Fulltext functions
Language elements
Numerical functions
Other functions
Ramtext functions
Socket functions
Statistical functions
Stream functions
String functions
System functions
Table functions
Text functions
  • close()
  • convline()
  • eot()
  • read()
  • readln()
  • reset()
  • rewrite()
  • tappend()
  • write()
  • writeln()
    Home    Overview    Search    Impressum    Contact    Members
    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:
    read() readln() close() eot()
    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!

    Example 1:

    Give out a complete textfile line by line

      IF t:=reset('mytext.txt') THEN
        WHILE NOT EOT(t) DO

    User comments:
    Write a comment:
    Text (Switch mode)

    Choose between
    the normal and the
    advanced editor.
    The advanced editor
    runs in IE 5+ and
    Mozilla 1.4+ only
    SPAM-Protection Please enter tdbengine in this field.

    tdbengine chat

       Copyright © 2003-2004 tdb Software Service GmbH
       Alle rechte vorbehalten. / All rights reserved
       Last changed: 21.10.2004
    {Fehler für :execmacro{execmacro="sessionspy"}