Servertec | Statements

Content Introduction Release Notes Features FAQs Requirements Installation Change Log Future Plans Knowledge Base Reference Manual Conventions Scriptlets Data Types Constants Variables Procedures Operators Statements = break call // /* */ continue exit include return If-Then-End If-Then-Else-End If-Then -ElseIf-Then -End If-Then -ElseIf-Then -Else-End Do-Loop Do-Until-Loop Do-While-Loop Do-Loop-Until Do-Loop-While For-Next For-Step-Next Objects Wrappers Servlet Server Pages Preprocessor Executable Samples Legal Contact Us |
A statement is an complete instruction to the computer. There are simple statements and compound statements. Simple statements span a single line. While compound statements span multiple lines and include a beginning statement and an ending statement. #### Statements
Statement | Description
Simple Statements |
Assignment | Used to assign a value to a variable.
Break | Used to exit a for-next/do-loop statement.
Call | Transfers control to a subroutine.
Comment | Text which is ignored and used for documentation purposes.
Continue | Used to goto the next interaction of a for-next/do-loop statement.
Exit | Ends the program and returns control to the system.
Include | Include the specified file.
Return | Return to the caller.
Compound Statements |
If-Then-End | Used to conditionally execute a block of statements when expression evaluates to true.
If-Then-Else-End | Used to conditionally execute a block of statements when expression evaluates to true and another block of statements when the expression is false.
If-Then-ElseIf-Then-End | Used to conditionally execute a block of statements when some expression evaluates to true.
If-Then-ElseIf-Then-Else-End | Used to conditionally execute a block of statements when some expression evaluates to true and another block of statements when the expressions are false.
Do-Loop | Repeats a block of statements.
Do-Until-Loop | Repeats a block of statements until the specified expression is true.
Do-While-Loop | Repeats a block of statements while the specified expression is true.
Do-Loop-Until | Repeats a block of statements until the specified expression is true.
Do-Loop-While | Repeats a block of statements while the specified expression is true.
For-Next | Repeats a block of statements a specified number of times.
For-Step-Next | Repeats a block of statements a specified number of times.
#### Notes A ; may be used to delimit multiple statements within a line. #### Example
    do
        name = input( "first name:" )
        if name = "" then
            break
        end

        if name = "tom" then
            println( "hello " + name )
        else
            println( "hi" + name )
        end
    loop
#### Example
    sOffset = 1 ; eOffset = 100 ; increment = 2
top of page Copyright © 1998-2005 Servertec. All rights reserved. Privacy Statement. Last Modified: Sun Sep 04 14:56:08 EDT 2005