Revision history for KeyPgProperty
Revision [22554]
Last edited on 2019-01-19 15:08:28 by fxm [Added note on returning from an indexed get-Property]Additions:
A **Property** may optionally have one ##//index//## parameter. When indexed, properties are accessed as ##//fieldname//##(Index) = Value.
**Note:** When a get-**Property** is defined with one ##//index//## parameter, the ##//fieldname//=## syntax can not be used to return a value. For such a get-**Property**, the ##property=## syntax (in addition to the ##[[KeyPgReturn|return]]## syntax) is only the one allowed.
**Note:** When a get-**Property** is defined with one ##//index//## parameter, the ##//fieldname//=## syntax can not be used to return a value. For such a get-**Property**, the ##property=## syntax (in addition to the ##[[KeyPgReturn|return]]## syntax) is only the one allowed.
Deletions:
Revision [21870]
Edited on 2017-08-23 16:55:48 by fxm [Added in the syntax the "byref" optional specifier for returning by reference]Additions:
[[KeyPgDeclare|declare]] **Property** //fieldname// () [ [[KeyPgByrefFunction|byref]] ] [[KeyPgAs|as]] [[DataType|datatype]]
[[KeyPgDeclare|declare]] **Property** //fieldname// ( [ [[KeyPgByref|byref]] | [[KeyPgByval|byval]] ] //index// [[KeyPgAs|as]] [[DataType|datatype]] ) [ [[KeyPgByrefFunction|byref]] ] [[KeyPgAs|as]] [[DataType|datatype]]
**Property** //typename//.//fieldname// () [ [[KeyPgByrefFunction|byref]] ] [[KeyPgAs|as]] [[DataType|datatype]] [ [[KeyPgExport|Export]] ]
**Property** //typename//.//fieldname// ( [ [[KeyPgByref|byref]] | [[KeyPgByval|byval]] ] //index// [[KeyPgAs|as]] [[DataType|datatype]] ) [ [[KeyPgByrefFunction|byref]] ] [[KeyPgAs|as]] [[DataType|datatype]] [ [[KeyPgExport|Export]] ]
A get-**Property** can also return a reference by specifying ##[[KeyPgByrefFunction|byref]] [[KeyPgAs|as]] //return_type//##.
[[KeyPgDeclare|declare]] **Property** //fieldname// ( [ [[KeyPgByref|byref]] | [[KeyPgByval|byval]] ] //index// [[KeyPgAs|as]] [[DataType|datatype]] ) [ [[KeyPgByrefFunction|byref]] ] [[KeyPgAs|as]] [[DataType|datatype]]
**Property** //typename//.//fieldname// () [ [[KeyPgByrefFunction|byref]] ] [[KeyPgAs|as]] [[DataType|datatype]] [ [[KeyPgExport|Export]] ]
**Property** //typename//.//fieldname// ( [ [[KeyPgByref|byref]] | [[KeyPgByval|byval]] ] //index// [[KeyPgAs|as]] [[DataType|datatype]] ) [ [[KeyPgByrefFunction|byref]] ] [[KeyPgAs|as]] [[DataType|datatype]] [ [[KeyPgExport|Export]] ]
A get-**Property** can also return a reference by specifying ##[[KeyPgByrefFunction|byref]] [[KeyPgAs|as]] //return_type//##.
Deletions:
[[KeyPgDeclare|declare]] **Property** //fieldname// ( [ [[KeyPgByref|byref]] | [[KeyPgByval|byval]] ] //index// [[KeyPgAs|as]] [[DataType|datatype]] ) [[KeyPgAs|as]] [[DataType|datatype]]
**Property** //typename//.//fieldname// () [[KeyPgAs|as]] [[DataType|datatype]] [ [[KeyPgExport|Export]] ]
**Property** //typename//.//fieldname// ( [ [[KeyPgByref|byref]] | [[KeyPgByval|byval]] ] //index// [[KeyPgAs|as]] [[DataType|datatype]] ) [[KeyPgAs|as]] [[DataType|datatype]] [ [[KeyPgExport|Export]] ]
A get-**Property** can also return a reference by specifying ##[[KeyPgByrefFunction|Byref]] [[KeyPgAs|as]] //return_type//##.
Revision [21865]
Edited on 2017-08-23 13:51:14 by fxm [Added in description that a get-Property can also return a reference (with associated syntax)]No Differences
Revision [21864]
Edited on 2017-08-23 13:48:28 by fxm [Added in description that a get-Property can also return a references (with associated syntax)]No Differences
Revision [21863]
Edited on 2017-08-23 13:32:49 by fxm [Added in description that a get-Property can also return a references (with associated syntax)]Additions:
A get-**Property** can also return a reference by specifying ##[[KeyPgByrefFunction|Byref]] [[KeyPgAs|as]] //return_type//##.
Additions:
Additions:
{ [[KeyPgType|Type]] | [[KeyPgClass|Class]] } //typename//
[[KeyPgDeclare|declare]] **Property** //fieldname// () [[KeyPgAs|as]] [[DataType|datatype]]
[[KeyPgDeclare|declare]] **Property** //fieldname// ( [ [[KeyPgByref|byref]] | [[KeyPgByval|byval]] ] //new_value// [[KeyPgAs|as]] [[DataType|datatype]] )
[[KeyPgDeclare|declare]] **Property** //fieldname// ( [ [[KeyPgByref|byref]] | [[KeyPgByval|byval]] ] //index// [[KeyPgAs|as]] [[DataType|datatype]] ) [[KeyPgAs|as]] [[DataType|datatype]]
[[KeyPgDeclare|declare]] **Property** //fieldname// ( [ [[KeyPgByref|byref]] | [[KeyPgByval|byval]] ] //index// [[KeyPgAs|as]] [[DataType|datatype]], [ [[KeyPgByref|byref]] | [[KeyPgByval|byval]] ] //new_value// [[KeyPgAs|as]] [[DataType|datatype]] )
End { [[KeyPgType|Type]] | [[KeyPgClass|Class]] }
**Property** //typename//.//fieldname// () [[KeyPgAs|as]] [[DataType|datatype]] [ [[KeyPgExport|Export]] ]
**Property** //typename//.//fieldname// ( [ [[KeyPgByref|byref]] | [[KeyPgByval|byval]] ] //new_value// [[KeyPgAs|as]] [[DataType|datatype]] ) [ [[KeyPgExport|Export]] ]
**Property** //typename//.//fieldname// ( [ [[KeyPgByref|byref]] | [[KeyPgByval|byval]] ] //index// [[KeyPgAs|as]] [[DataType|datatype]] ) [[KeyPgAs|as]] [[DataType|datatype]] [ [[KeyPgExport|Export]] ]
**Property** //typename//.//fieldname// ( [ [[KeyPgByref|byref]] | [[KeyPgByval|byval]] ] //index// [[KeyPgAs|as]] [[DataType|datatype]], [ [[KeyPgByref|byref]] | [[KeyPgByval|byval]] ] //new_value// [[KeyPgAs|as]] [[DataType|datatype]] ) [ [[KeyPgExport|Export]] ]
name of the ##[[KeyPgType|Type]]## or ##[[KeyPgClass|Class]]##
##**Property**## fields are used to get and set values of a ##[[KeyPgType|Type]]## or ##[[KeyPgClass|Class]]## in the same way as other data fields except instead of a simple assignment to a field or a value retrieved from field, a procedure is executed.
##//typename//## is the name of the type for which the ##**Property**## method is declared and defined. Name resolution for ##//typename//## follows the same rules as procedures when used in a ##[[KeyPgNamespace|Namespace]]##.
A hidden ##[[KeyPgThis|this]]## parameter having the same type as ##//typename//## is passed to the property procedure. ##[[KeyPgThis|this]]## is used to access the fields of the ##[[KeyPgType|Type]]## or ##[[KeyPgClass|Class]]##.
- ##[[KeyPgClass|Class]]##
- ##[[KeyPgType|Type]]##
[[KeyPgDeclare|declare]] **Property** //fieldname// () [[KeyPgAs|as]] [[DataType|datatype]]
[[KeyPgDeclare|declare]] **Property** //fieldname// ( [ [[KeyPgByref|byref]] | [[KeyPgByval|byval]] ] //new_value// [[KeyPgAs|as]] [[DataType|datatype]] )
[[KeyPgDeclare|declare]] **Property** //fieldname// ( [ [[KeyPgByref|byref]] | [[KeyPgByval|byval]] ] //index// [[KeyPgAs|as]] [[DataType|datatype]] ) [[KeyPgAs|as]] [[DataType|datatype]]
[[KeyPgDeclare|declare]] **Property** //fieldname// ( [ [[KeyPgByref|byref]] | [[KeyPgByval|byval]] ] //index// [[KeyPgAs|as]] [[DataType|datatype]], [ [[KeyPgByref|byref]] | [[KeyPgByval|byval]] ] //new_value// [[KeyPgAs|as]] [[DataType|datatype]] )
End { [[KeyPgType|Type]] | [[KeyPgClass|Class]] }
**Property** //typename//.//fieldname// () [[KeyPgAs|as]] [[DataType|datatype]] [ [[KeyPgExport|Export]] ]
**Property** //typename//.//fieldname// ( [ [[KeyPgByref|byref]] | [[KeyPgByval|byval]] ] //new_value// [[KeyPgAs|as]] [[DataType|datatype]] ) [ [[KeyPgExport|Export]] ]
**Property** //typename//.//fieldname// ( [ [[KeyPgByref|byref]] | [[KeyPgByval|byval]] ] //index// [[KeyPgAs|as]] [[DataType|datatype]] ) [[KeyPgAs|as]] [[DataType|datatype]] [ [[KeyPgExport|Export]] ]
**Property** //typename//.//fieldname// ( [ [[KeyPgByref|byref]] | [[KeyPgByval|byval]] ] //index// [[KeyPgAs|as]] [[DataType|datatype]], [ [[KeyPgByref|byref]] | [[KeyPgByval|byval]] ] //new_value// [[KeyPgAs|as]] [[DataType|datatype]] ) [ [[KeyPgExport|Export]] ]
name of the ##[[KeyPgType|Type]]## or ##[[KeyPgClass|Class]]##
##**Property**## fields are used to get and set values of a ##[[KeyPgType|Type]]## or ##[[KeyPgClass|Class]]## in the same way as other data fields except instead of a simple assignment to a field or a value retrieved from field, a procedure is executed.
##//typename//## is the name of the type for which the ##**Property**## method is declared and defined. Name resolution for ##//typename//## follows the same rules as procedures when used in a ##[[KeyPgNamespace|Namespace]]##.
A hidden ##[[KeyPgThis|this]]## parameter having the same type as ##//typename//## is passed to the property procedure. ##[[KeyPgThis|this]]## is used to access the fields of the ##[[KeyPgType|Type]]## or ##[[KeyPgClass|Class]]##.
- ##[[KeyPgClass|Class]]##
- ##[[KeyPgType|Type]]##
Deletions:
[[KeyPgDeclare declare]] **Property** //fieldname// () [[KeyPgAs as]] [[DataType datatype]]
[[KeyPgDeclare declare]] **Property** //fieldname// ( [ [[KeyPgByref byref]] | [[KeyPgByval byval]] ] //new_value// [[KeyPgAs as]] [[DataType datatype]] )
[[KeyPgDeclare declare]] **Property** //fieldname// ( [ [[KeyPgByref byref]] | [[KeyPgByval byval]] ] //index// [[KeyPgAs as]] [[DataType datatype]] ) [[KeyPgAs as]] [[DataType datatype]]
[[KeyPgDeclare declare]] **Property** //fieldname// ( [ [[KeyPgByref byref]] | [[KeyPgByval byval]] ] //index// [[KeyPgAs as]] [[DataType datatype]], [ [[KeyPgByref byref]] | [[KeyPgByval byval]] ] //new_value// [[KeyPgAs as]] [[DataType datatype]] )
End { [[KeyPgType Type]] | [[KeyPgClass Class]] }
**Property** //typename//.//fieldname// () [[KeyPgAs as]] [[DataType datatype]] [ [[KeyPgExport Export]] ]
**Property** //typename//.//fieldname// ( [ [[KeyPgByref byref]] | [[KeyPgByval byval]] ] //new_value// [[KeyPgAs as]] [[DataType datatype]] ) [ [[KeyPgExport Export]] ]
**Property** //typename//.//fieldname// ( [ [[KeyPgByref byref]] | [[KeyPgByval byval]] ] //index// [[KeyPgAs as]] [[DataType datatype]] ) [[KeyPgAs as]] [[DataType datatype]] [ [[KeyPgExport Export]] ]
**Property** //typename//.//fieldname// ( [ [[KeyPgByref byref]] | [[KeyPgByval byval]] ] //index// [[KeyPgAs as]] [[DataType datatype]], [ [[KeyPgByref byref]] | [[KeyPgByval byval]] ] //new_value// [[KeyPgAs as]] [[DataType datatype]] ) [ [[KeyPgExport Export]] ]
name of the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##
##**Property**## fields are used to get and set values of a ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]## in the same way as other data fields except instead of a simple assignment to a field or a value retrieved from field, a procedure is executed.
##//typename//## is the name of the type for which the ##**Property**## method is declared and defined. Name resolution for ##//typename//## follows the same rules as procedures when used in a ##[[KeyPgNamespace Namespace]]##.
A hidden ##[[KeyPgThis this]]## parameter having the same type as ##//typename//## is passed to the property procedure. ##[[KeyPgThis this]]## is used to access the fields of the ##[[KeyPgType Type]]## or ##[[KeyPgClass Class]]##.
- ##[[KeyPgClass Class]]##
- ##[[KeyPgType Type]]##
Revision [17845]
Edited on 2015-11-02 08:35:10 by FxMwikki [Added optional specifier 'Export' in keyword syntax]Additions:
**Property** //typename//.//fieldname// () [[KeyPgAs as]] [[DataType datatype]] [ [[KeyPgExport Export]] ]
**Property** //typename//.//fieldname// ( [ [[KeyPgByref byref]] | [[KeyPgByval byval]] ] //new_value// [[KeyPgAs as]] [[DataType datatype]] ) [ [[KeyPgExport Export]] ]
**Property** //typename//.//fieldname// ( [ [[KeyPgByref byref]] | [[KeyPgByval byval]] ] //index// [[KeyPgAs as]] [[DataType datatype]] ) [[KeyPgAs as]] [[DataType datatype]] [ [[KeyPgExport Export]] ]
**Property** //typename//.//fieldname// ( [ [[KeyPgByref byref]] | [[KeyPgByval byval]] ] //index// [[KeyPgAs as]] [[DataType datatype]], [ [[KeyPgByref byref]] | [[KeyPgByval byval]] ] //new_value// [[KeyPgAs as]] [[DataType datatype]] ) [ [[KeyPgExport Export]] ]
**Property** //typename//.//fieldname// ( [ [[KeyPgByref byref]] | [[KeyPgByval byval]] ] //new_value// [[KeyPgAs as]] [[DataType datatype]] ) [ [[KeyPgExport Export]] ]
**Property** //typename//.//fieldname// ( [ [[KeyPgByref byref]] | [[KeyPgByval byval]] ] //index// [[KeyPgAs as]] [[DataType datatype]] ) [[KeyPgAs as]] [[DataType datatype]] [ [[KeyPgExport Export]] ]
**Property** //typename//.//fieldname// ( [ [[KeyPgByref byref]] | [[KeyPgByval byval]] ] //index// [[KeyPgAs as]] [[DataType datatype]], [ [[KeyPgByref byref]] | [[KeyPgByval byval]] ] //new_value// [[KeyPgAs as]] [[DataType datatype]] ) [ [[KeyPgExport Export]] ]
Deletions:
**Property** //typename//.//fieldname// ( [ [[KeyPgByref byref]] | [[KeyPgByval byval]] ] //new_value// [[KeyPgAs as]] [[DataType datatype]] )
**Property** //typename//.//fieldname// ( [ [[KeyPgByref byref]] | [[KeyPgByval byval]] ] //index// [[KeyPgAs as]] [[DataType datatype]] ) [[KeyPgAs as]] [[DataType datatype]]
**Property** //typename//.//fieldname// ( [ [[KeyPgByref byref]] | [[KeyPgByval byval]] ] //index// [[KeyPgAs as]] [[DataType datatype]], [ [[KeyPgByref byref]] | [[KeyPgByval byval]] ] //new_value// [[KeyPgAs as]] [[DataType datatype]] )
Additions:
A **Property** may optionally have one index parameter. When indexed, properties are accessed as ##//fieldname//##(Index) = Value.
Deletions:
Additions:
A **Property** may optionally have one index parameter. When indexed, properties are accessed as **Property**(Index) = Value.
Deletions:
Revision [17699]
Edited on 2015-06-17 05:43:38 by FxMwikki [Added note: standard property does not work with combination operators]Additions:
**Note:** A standard **Property** (get & set) does not work with combination operators (as "+="). But a result byref get-**Property** (as more generally any result byref function) works with combination operators.
Deletions:
Revision [17698]
Edited on 2015-06-16 13:46:49 by FxMwikki [Added note: standard property does not work with combination operators]Additions:
**Note:** A standard **Property** (get/set) does not work with combination operators (as "+="). But a result byref get-**Property** (as more generally any result byref function) works with combination operators.
Revision [16081]
Edited on 2012-02-05 08:08:05 by FxMwikki [Bad link to 'Class' in paragraph 'See also']Additions:
- ##[[KeyPgClass Class]]##