Revision history for KeyPgModuleConstructor


Revision [21739]

Last edited on 2017-01-22 10:47:30 by fxm [Added note about possibility to define a public static member Sub as module constructor]
Additions:
**Note:** A public static member procedure (Sub having empty parameter list) can also be defined as module constructor (also with the ##**Constructor**## keyword only used in Sub definition).


Revision [21704]

Edited on 2016-11-15 04:57:48 by fxm [Rewording]
Additions:
The ##**Constructor**## keyword is used in ##[[KeyPgSub|Sub]]## definitions (forbidden at declaration line level) to force execution of the procedure prior to that of module-level code. Procedures defined as constructors may be used the same way as ordinary procedures, that is, they may be called from within module-level code, as well as other procedures.
Deletions:
The ##**Constructor**## keyword is used in ##[[KeyPgSub|Sub]]## definitions to force execution of the procedure prior to that of module-level code. Procedures defined as constructors may be used the same way as ordinary procedures, that is, they may be called from within module-level code, as well as other procedures.


Revision [20980]

Edited on 2016-03-13 04:40:32 by fxm [Formatting]

No Differences

Revision [20327]

Edited on 2016-02-10 16:02:59 by DkLwikki [Update link format]
Additions:
[[[KeyPgPublic|Public]] | [[KeyPgPrivate|Private]]] [[KeyPgSub|Sub]] //procedure_name// [[[KeyPgAlias|Alias]] "//external_identifier//"] [()] **Constructor** [//priority//] [[[KeyPgStatic|Static]]]
[[KeyPgEndblock|End]] [[KeyPgSub|Sub]]
The ##**Constructor**## keyword is used in ##[[KeyPgSub|Sub]]## definitions to force execution of the procedure prior to that of module-level code. Procedures defined as constructors may be used the same way as ordinary procedures, that is, they may be called from within module-level code, as well as other procedures.
A module may define multiple constructor procedures, and multiple modules may define additional constructors provided no two ##[[KeyPgPublic|Public]]## constructors share the same //procedure_name//.
- [[KeyPgConstructor|Constructor (Class)]]
- [[KeyPgModuleDestructor|Destructor (Module)]]
- [[KeyPgSub|Sub]]
Deletions:
[[[KeyPgPublic Public]] | [[KeyPgPrivate Private]]] [[KeyPgSub Sub]] //procedure_name// [[[KeyPgAlias Alias]] "//external_identifier//"] [()] **Constructor** [//priority//] [[[KeyPgStatic Static]]]
[[KeyPgEndblock End]] [[KeyPgSub Sub]]
The ##**Constructor**## keyword is used in ##[[KeyPgSub Sub]]## definitions to force execution of the procedure prior to that of module-level code. Procedures defined as constructors may be used the same way as ordinary procedures, that is, they may be called from within module-level code, as well as other procedures.
A module may define multiple constructor procedures, and multiple modules may define additional constructors provided no two ##[[KeyPgPublic Public]]## constructors share the same //procedure_name//.
- [[KeyPgConstructor Constructor (Class)]]
- [[KeyPgModuleDestructor Destructor (Module)]]
- [[KeyPgSub Sub]]


Revision [16217]

Edited on 2012-07-08 13:43:51 by FxMwikki [In single module, constructors execution order is reverse of definition]
Additions:
In a single module, constructors normally execute in the reverse order in which they are defined.
Deletions:
In a single module, constructors normally execute in the order in which they are defined.


Revision [14062]

Edited on 2008-12-24 09:56:18 by CountingPine [Link to Class Constructor]
Additions:
- New to ""FreeBASIC""
- [[KeyPgConstructor Constructor (Class)]]
Deletions:
- New to FreeBASIC


Revision [11560]

The oldest known version of this page was created on 2007-11-10 01:12:46 by JeffMarshall [Link to Class Constructor]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode