Statements Summary

The following pages provide detailed information on the basic statements that are provided as an integral portion of the Guidance Programming Language.  These statements provide standard functionality found in any programming language such as control structures, variable declarations, subroutine and function calls, etc.  As much as possible, these statements have been modeled after standard instructions provide by other variants of the Basic Programming Language.

Table 19-94 summarizes the statements that are described in greater detail in the following sections.

Table 19-94: Table 19-94Statement Summary

Statement Description

Call

Transfers control to a procedure and ignores its return value.

Case / Case Else

Used within a Select...Case...End Select sequence to specify possible matches for the target value and to delineate the statements to be executed if a match occurs.

Class

Begins a Class definition.

Const

Declares a read-only variable for use in a procedure.

Delegate

Creates a Delegate class that provides a means for indirectly calling a function or subroutine procedure using an object variable.

Dim

Declares a variable for use in a procedure.

Do...Loop

Bounds a block of instructions that are repeatedly executed so long as a specified expression evaluates to True or until the expression value becomes True.

Else, ElseIf

Used within an If…Then…Else…End If series of statements to conditionally execute alternative blocks of instructions.

End

Marks the end of a control structure or major project element such as a program or function.

Exit

Terminates the execution of a block of instructions within the innermost control structure of a specified type or a procedure.

For...Next

Bounds a block of instructions that are repeatedly executed a specified number of times.

Function

Begins a user-defined function procedure.

Get

Begins a Get procedure block within a Property procedure definition.

Goto

Performs an unconditional branch and continues execution at a specified labeled instruction.

If...Then...Else...End

Conditionally executes a block of embedded statements based upon the value of an expression.

Loop

Marks the end of a Do…Loop block of instructions and in some instances also specifies the loop termination condition.

Module

Begins a user-defined module section. All variable definitions and procedures must be inside a Module or Class definition.

Next

Marks the end of a For…Next block of instructions.

Property

Begins a user-defined Property procedure.

ReDim

Increases or decreases an array size by changing the array's upper bounds.

Return

Causes a user-define procedure to return control to the calling procedure and optionally return a value.

Select...Case...End Select

Evaluates a target expression, compares its value to a series of values and executes the block of statements associated with the first matching value.

Set

Begins a Set procedure block within a Property procedure definition.

Sub

Begins a user-defined subroutine procedure.

While...End While

Bounds a block of instructions that are repeatedly executed so long as a specified expression evaluates to True.