Servertec if then-elseif then-else-end
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

 

Used to conditionally execute a block of statements when some expression evaluates to true and another block of statements when the expressions are false.

Syntax

    if expression then
    { statement }...
    [ elseif expression then
    { statement }... ]...
    else
    { statement }...
    end

Notes

    expression the expression to evaluate.
    statement any statements to process.

Example

    if quantity > 0 then
        unitCost = totalAmount / quantity
        println( "Unit Cost: " + unitCost )
    elseif quantity = 0 then
        println( "0 items ordered" )
    else
        print( quantity + "is not valid value" )
    end
    
 top of page
Copyright © 1998-2005 Servertec. All rights reserved.
Privacy Statement.
Last Modified: Sun Sep 04 14:56:08 EDT 2005