Statements
CONTRIBUTOR: Shahjahan Alhassan - 16th Jan 2002

  • Statements allow you to control the flow of a script and check for errors.


  • Variables, functions and subroutines can be used via statements.


  • Declaration Statements
    Statement Description
    Const Declares constants.
    Dim Declares variables and assigns storage space.
    End Declares the end of a Function or Sub procedure.
    Exit Quits a Do...Loop, For...Next, Function or Sub procedure.
    Function Declares the name, argument list and code for a Function procedure.
    Redim Declares dynamic array variables and assigns storage space.
    Sub Declares the name, argument list and code for a Sub procedure.
     
    Error Statement
    Statement Description
    On Error Allows error handling in a script.
     
    Option Statement
    Statement Description
    Option Explicit Requires a precise declaration of all variables in a script.
     
    Program Flow Statements
    Statement Description
    Call Executes a Function or Sub procedure.
    Do Until Declares variables and assigns storage space.
    Do While Declares the end of a Function or Sub procedure.
    For...Next Quits a Do...Loop, For...Next, Function or Sub procedure.
    If...Then Declares the name, argument list and code for a Function procedure.
    If...Then...Else Declares dynamic array variables and assigns storage space.
    If...Then...ElseIf Declares the name, argument list and code for a Sub procedure.
    Select Case Declares dynamic array variables and assigns storage space.
    While...Wend Declares the name, argument list and code for a Sub procedure.