Deutsch English
Alphabetical index
Array functions
CGI functions
Data types
Date functions
Debugging
Fulltext functions
Language elements
  • 'ANWEISUNGEN'
  • 'AUSDRÜCKE'
  • 'BEZEICHNER'
  • DEF
  • IF
  • 'INDEXBESCHREIBUNG'
  • 'KONSTANTEN'
  • MODULE
  • PROCEDURE
  • REPEAT
  • RETURN
  • USES
  • VAR
  • WHILE
    Numerical functions
    Operators
    Other functions
    Ramtext functions
    Selecting
    Socket functions
    Statistical functions
    Stream functions
    String functions
    System functions
    Table functions
    Text functions
    Home    Overview    Search    Impressum    Contact    Members
    Topic complex Language elements
    Function WHILE
    Short Rejecting program loop
    Syntax WHILE boolexp DO Anweisungen END
    Parameter boolexp: logical expression, selection
    Return
    See also:
    REPEAT 'ANWEISUNGEN'
    Description WHILE leads to a so called rejecting loop. The logical expression is tested. If the test returns TRUE, all the orders between DO and the corresponding END are executed. After that the whole games starts again, as long as the expression returns TRUE.

    If the very first test of the expression returns FALSE, the loop won't be processed even once.

    Example:
    VAR i : INTEGER
    WHILE i++<=10 DO
      cgiwriteln(str(i))
    END

    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"}