Revision history for KeyPgBaseInit


Revision [22257]

Last edited on 2018-03-21 15:41:58 by fxm [Parentheses are also required in the second syntax]
Additions:
**base** ( //UDT-initializers...// )
The ##**Base**## initializer can be used at the top of constructors of derived UDTs. It allows to specify an explicit constructor call or UDT initializers to be used to initialize the base object. It will replace the implicit default initialization, and must appear above any other statements in the constructor it is used in.
Deletions:
**base** //UDT-initializer//
The ##**Base**## initializer can be used at the top of constructors of derived UDTs. It allows to specify an explicit constructor call or UDT initializer to be used to initialize the base object. It will replace the implicit default initialization, and must appear above any other statements in the constructor it is used in.


Revision [21998]

Edited on 2017-11-21 01:10:56 by JeffMarshall [fix page link name case]
Additions:
- ##[[KeyPgOptionbase|Option Base]]##
Deletions:
- ##[[KeyPgOptionBase|Option Base]]##


Revision [20059]

Edited on 2016-02-10 15:54:50 by DkLwikki [Update link format]
Additions:
Specifies an initializer for the base UDT in derived [[KeyPgType|UDT]] constructors
Note: Unlike "##**Base( )**##", a "##[[KeyPgBase|Base]].[[KeyPgConstructor|Constructor]]( )##" statement does not replace the implicit default initialization done by the constructor of a derived UDT, and can usually not be used legally, because it would result in two constructor calls for the base object (for an inheritance structure extending the built-in ##[[KeyPgObject|Object]]## type, this second base constructor call may also corrupt the vtable pointer to point to the base-type vtable instead of to the type vtable).
- Methods are only supported in the //[[CompilerOptlang|-lang fb]]// dialect, hence ##**Base**## has no function in other dialects.
- ##[[KeyPgBase|Base (member access)]]##
- ##[[KeyPgThis|This]]##
- ##[[KeyPgType|Type]]##
- ##[[KeyPgExtends|Extends]]##
- ##[[KeyPgOptionBase|Option Base]]##
Deletions:
Specifies an initializer for the base UDT in derived [[KeyPgType UDT]] constructors
Note: Unlike "##**Base( )**##", a "##[[KeyPgBase Base]].[[KeyPgConstructor Constructor]]( )##" statement does not replace the implicit default initialization done by the constructor of a derived UDT, and can usually not be used legally, because it would result in two constructor calls for the base object (for an inheritance structure extending the built-in ##[[KeyPgObject Object]]## type, this second base constructor call may also corrupt the vtable pointer to point to the base-type vtable instead of to the type vtable).
- Methods are only supported in the //[[CompilerOptlang -lang fb]]// dialect, hence ##**Base**## has no function in other dialects.
- ##[[KeyPgBase Base (member access)]]##
- ##[[KeyPgThis This]]##
- ##[[KeyPgType Type]]##
- ##[[KeyPgExtends Extends]]##
- ##[[KeyPgOptionBase Option Base]]##


Revision [19835]

Edited on 2016-01-17 08:14:30 by FxMwikki [Use 'Base.Constructor(...)' may also corrupt the vtable pointer of an object]
Additions:
Note: Unlike "##**Base( )**##", a "##[[KeyPgBase Base]].[[KeyPgConstructor Constructor]]( )##" statement does not replace the implicit default initialization done by the constructor of a derived UDT, and can usually not be used legally, because it would result in two constructor calls for the base object (for an inheritance structure extending the built-in ##[[KeyPgObject Object]]## type, this second base constructor call may also corrupt the vtable pointer to point to the base-type vtable instead of to the type vtable).
Deletions:
Note: Unlike "##**Base( )**##", a "##[[KeyPgBase Base]].[[KeyPgConstructor Constructor]]( )##" statement does not replace the implicit default initialization done by the constructor of a derived UDT, and can usually not be used legally, because it would result in two constructor calls for the base object.


Revision [17269]

Edited on 2014-09-13 03:42:13 by FxMwikki [Compile error with second example since fbc version 1.00.0 (former 0.91.0)]
Additions:
declare constructor( byval as integer = 0 )
constructor ComplexParent( byval i as integer = 0 )
Deletions:
declare constructor( byval as integer )
constructor ComplexParent( byval i as integer )


Revision [16182]

Edited on 2012-05-23 18:17:16 by DkLwikki [Add new page for BASE() initializer]
Additions:
Note: Unlike "##**Base( )**##", a "##[[KeyPgBase Base]].[[KeyPgConstructor Constructor]]( )##" statement does not replace the implicit default initialization done by the constructor of a derived UDT, and can usually not be used legally, because it would result in two constructor calls for the base object.
Deletions:
Note: Unlike ##Base( )##, a ##[[KeyPgBaseBase]].[[KeyPgConstructor Constructor]]()## statement does not replace the implicit default initialization done by the constructor of a derived UDT, and can usually not be used legally, because it would result in two constructor calls for the base object.


Revision [16181]

Edited on 2012-05-23 18:16:13 by DkLwikki [Add new page for BASE() initializer]
Additions:
**base** ( //constructor-parameters...// )
**base** //UDT-initializer//
Deletions:
**base** ( //constructor call parameters...// )
**base** //UDT initializer//
print "ctor( integer )"


Revision [16180]

The oldest known version of this page was created on 2012-05-23 18:15:05 by DkLwikki [Add new page for BASE() initializer]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode