Constructor Statement

Initializes the data of a new instance of an object.

Syntax

Constructor [ Dim | Var ] [ parameter_list ]
    [ statements ]
End [ Constructor ]

Parts

Dim
Optional – Specifies that the variables in parameter_list are members of the parent construct. The arguments that you supply automatically assign values to the members. Such a constructor must come before other usual constructors.
Var
Same as Dim.
parameter_list
Optional – See Parameter List for more information.
statements
Optional executable statements.
End
Completes the statement. You can also use End Constructor.

Instructions

ViviFire permits multiple constructors in an object. Each constructor must have a different parameter signature.

All constructors must be in a group together. They come after a possible data section and before a possible destructor or other procedures.

You can think of the data section as a type of constructor. Statements you put in this section execute before a Constructor.

Permitted parents

Changes in syntax with @Option

There are two areas where you can change the syntax of the statement:

See @Option Directive for more information.

Examples

TODO

See also