Initializes the data of a new instance of an object.
Constructor [ Dim | Var ] [ parameter_list ] [ statements ] End [ Constructor ]
- 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.
- Same as Dim.
- Optional – See Parameter List for more information.
- Optional executable statements.
- Completes the statement. You can also use End Constructor.
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.
Changes in syntax with @Option
There are two areas where you can change the syntax of the statement:
- @Option Dim With Dim and @Option Dim With Var
- @Option End With Block and @Option End Without Block
See @Option Directive for more information.