Constructor Statement

Initializes the state of a newly created class using the parameters passed to it.

Syntax

Constructor [ parameter_list ]
    [ statements ]
End [ Constructor ]

Parts

parameter_list
Optional
statements
Optional
End
Completes the statement. You can also use End Constructor.

Instructions

Multiple constructors are permitted within a class if each constructor has a different parameter signature.

All constructors must be grouped together following any state declarations and before any Destructor, Function, Method, or Sub.

The state declaration section at the top of a class can act as a common constructor. Statements placed in this section are executed before any explicit constructor gets called.

Examples

See also