Revision history for KeyPgOverride


Revision [22022]

Last edited on 2017-11-21 01:27:21 by JeffMarshall [backlink]
Additions:
{{fbdoc item="back" value="CatPgProcedures|Procedures"}}{{fbdoc item="back" value="CatPgUserDefTypes|User Defined Types"}}
Deletions:
{{fbdoc item="back" value="CatPgProcedures|Procedures"}}


Revision [21872]

Edited on 2017-08-23 17:08:43 by fxm [Added in the syntax the "byref" optional specifier for returning by reference]
Additions:
[[KeyPgDeclare|Declare]] [[KeyPgMemberSub|Sub]]|[[KeyPgMemberFunction|Function]]|[[KeyPgOperator|Operator]]|[[KeyPgProperty|Property]]|[[KeyPgDestructor|Destructor]] ... ( [//parameterlist//] ) [[ [[KeyPgByrefFunction|byref]] ] [[KeyPgAs|As]] //[[DataType|datatype]]//] **Override**
Deletions:
[[KeyPgDeclare|Declare]] [[KeyPgMemberSub|Sub]]|[[KeyPgMemberFunction|Function]]|[[KeyPgOperator|Operator]]|[[KeyPgProperty|Property]]|[[KeyPgDestructor|Destructor]] ... ( [//parameterlist//] ) [[[KeyPgAs|As]] //[[DataType|datatype]]//] **Override**


Revision [20435]

Edited on 2016-02-10 16:06:19 by DkLwikki [Update link format]
Additions:
[[KeyPgType|Type]] //typename// [[KeyPgExtends|Extends]] //basename//
[[KeyPgDeclare|Declare]] [[KeyPgMemberSub|Sub]]|[[KeyPgMemberFunction|Function]]|[[KeyPgOperator|Operator]]|[[KeyPgProperty|Property]]|[[KeyPgDestructor|Destructor]] ... ( [//parameterlist//] ) [[[KeyPgAs|As]] //[[DataType|datatype]]//] **Override**
In method declarations, ##**Override**## can be used to indicate that this method is expected to override a [[KeyPgVirtual|virtual]] or [[KeyPgAbstract|abstract]] method from the base class. Then the compiler will show an error if the method does not override anything (only a non-static method can override a virtual or abstract method).
- ##[[KeyPgVirtual|Virtual]]##, ##[[KeyPgAbstract|Abstract]]##
Deletions:
[[KeyPgType Type]] //typename// [[KeyPgExtends Extends]] //basename//
[[KeyPgDeclare Declare]] [[KeyPgMemberSub Sub]]|[[KeyPgMemberFunction Function]]|[[KeyPgOperator Operator]]|[[KeyPgProperty Property]]|[[KeyPgDestructor Destructor]] ... ( [//parameterlist//] ) [[[KeyPgAs As]] //[[DataType datatype]]//] **Override**
In method declarations, ##**Override**## can be used to indicate that this method is expected to override a [[KeyPgVirtual virtual]] or [[KeyPgAbstract abstract]] method from the base class. Then the compiler will show an error if the method does not override anything (only a non-static method can override a virtual or abstract method).
- ##[[KeyPgVirtual Virtual]]##, ##[[KeyPgAbstract Abstract]]##


Revision [16860]

Edited on 2013-06-22 16:48:19 by DkLwikki [Fix example to compile without error]
Additions:
Type A Extends Object
Declare Virtual Sub f1( )
Declare Virtual Function f2( ) As Integer
End Type
Type B Extends A
Declare Sub f1( ) Override
Declare Function f2( ) As Integer Override
End Type
Sub A.f1( )
End Sub
Function A.f2( ) As Integer
Function = 0
End Function
Sub B.f1( )
End Sub
Function B.f2( ) As Integer
Function = 0
End Function
Deletions:
type A extends object
declare virtual sub f1( )
declare virtual function f2( ) as integer
end type
type B extends A
declare sub f1( ) override
declare function f2( ) as integer override
end type
'' Note: define four procedure bodies to compile without error


Revision [16531]

Edited on 2013-01-05 08:22:39 by FxMwikki [Added a sentence highlighting that this attribute is not mandatory but recommended]
Additions:
Use of ##**Override**## is not mandatory to override a virtual or abstract method, it is highly recommended, as it will help prevent inadvertent errors (name/signature not matching).


Revision [16517]

Edited on 2012-12-26 14:11:38 by FxMwikki [Added note to compile the example without error]
Additions:
'' Note: define four procedure bodies to compile without error


Revision [16511]

Edited on 2012-12-26 11:46:21 by FxMwikki [Only a non-static method can override a virtual or abstract method]
Additions:
In method declarations, ##**Override**## can be used to indicate that this method is expected to override a [[KeyPgVirtual virtual]] or [[KeyPgAbstract abstract]] method from the base class. Then the compiler will show an error if the method does not override anything (only a non-static method can override a virtual or abstract method).
Deletions:
In method declarations, ##**Override**## can be used to indicate that this method is expected to override a [[KeyPgVirtual virtual]] or [[KeyPgAbstract abstract]] method from the base class. Then the compiler will show an error if the method does not override anything.


Revision [16510]

Edited on 2012-12-26 10:09:36 by DkLwikki [add [] around parameterlist (for destructors)]
Additions:
[[KeyPgDeclare Declare]] [[KeyPgMemberSub Sub]]|[[KeyPgMemberFunction Function]]|[[KeyPgOperator Operator]]|[[KeyPgProperty Property]]|[[KeyPgDestructor Destructor]] ... ( [//parameterlist//] ) [[[KeyPgAs As]] //[[DataType datatype]]//] **Override**
Deletions:
[[KeyPgDeclare Declare]] [[KeyPgMemberSub Sub]]|[[KeyPgMemberFunction Function]]|[[KeyPgOperator Operator]]|[[KeyPgProperty Property]]|[[KeyPgDestructor Destructor]] ... ( //parameterlist// ) [[[KeyPgAs As]] //[[DataType datatype]]//] **Override**


Revision [16509]

Edited on 2012-12-26 10:05:40 by DkLwikki [mention operator/property/destructor too]
Additions:
[[KeyPgDeclare Declare]] [[KeyPgMemberSub Sub]]|[[KeyPgMemberFunction Function]]|[[KeyPgOperator Operator]]|[[KeyPgProperty Property]]|[[KeyPgDestructor Destructor]] ... ( //parameterlist// ) [[[KeyPgAs As]] //[[DataType datatype]]//] **Override**
Deletions:
[[KeyPgDeclare Declare]] [[KeyPgMemberSub Sub]]|[[KeyPgMemberFunction Function]] //methodname// ( //parameterlist// ) [[[KeyPgAs As]] //[[DataType datatype]]//] **Override**


Revision [16503]

Edited on 2012-12-26 09:27:33 by DkLwikki [new page]
Additions:
In method declarations, ##**Override**## can be used to indicate that this method is expected to override a [[KeyPgVirtual virtual]] or [[KeyPgAbstract abstract]] method from the base class. Then the compiler will show an error if the method does not override anything.
Deletions:
In method declarations, ##**Override**## can be used to indicate that this method is expected to override a [[KeyPgVirtual virtual]] or [[KeyPgAbstract abstract]] method from the //base// class. Then the compiler will show an error if the method does not override anything.


Revision [16502]

Edited on 2012-12-26 09:27:04 by DkLwikki [new page]
Additions:
[[KeyPgType Type]] //typename// [[KeyPgExtends Extends]] //basename//
[[KeyPgDeclare Declare]] [[KeyPgMemberSub Sub]]|[[KeyPgMemberFunction Function]] //methodname// ( //parameterlist// ) [[[KeyPgAs As]] //[[DataType datatype]]//] **Override**
Deletions:
[[KeyPgType Type]] //class-id// [[KeyPgExtends Extends]] //base//
[[KeyPgDeclare Declare]] [[KeyPgMemberSub Sub]]|[[KeyPgMemberFunction Function]] //method-id// ( //parameter-list// ) [[[KeyPgAs As]]] **Override**


Revision [16501]

The oldest known version of this page was created on 2012-12-26 09:24:03 by DkLwikki [new page]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode