Deutsch English
Alphabetical index
Array functions
CGI functions
Data types
Date functions
Debugging
Fulltext functions
Language elements
Numerical functions
Operators
Other functions
Ramtext functions
Selecting
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

    VAR t : INTEGER
      IF t:=reset('mytext.txt') THEN
        WHILE NOT EOT(t) DO
           cgiwriteln(readln(t))
        END
        close(t)
      END


    User comments:
    Write a comment:
    Name
    EMail
    Subject
    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
    irc.tdbengine.org
    #tdbengine

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