Changes between Version 4 and Version 5 of Properties
- Timestamp:
- 01/16/14 11:53:04 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Properties
v4 v5 14 14 == Syntax == 15 15 {{{ 16 pro NAME from var [ is ACCESSMODIFIER ] (1) 17 pro NAME from VARNAME [ is ACCESSMODIFIER ] (2) 18 pro NAME from var [ as TYPE ] [ is ACCESSMODIFIER ] [ = INITEXPR ] (3) 19 20 pro NAME [as RETURNTYPE] [is ACCESSMODIFIER ] (4) 21 [ATTRIBUTE] 22 [DOCSTRING] 16 pro <Name> from var [ is <AccessModifier> ] (1) 17 pro <Name> from <VarName> [ is <AccessModifier> ] (2) 18 pro <Name> from var [ as <Type> ] [ is <AccessModifier> ] [ = <InitExpr> ] (3) 19 20 pro <Name> [as <Type>] [is <AccessModifier> ] (4) 21 [<Attribute>] 22 [<DocString>] 23 [ test 24 <Testblock> ] 23 25 [ get 24 GETBLOCK]26 <GetBlock> ] 25 27 [ set 26 SETBLOCK]28 <SetBlock> ] 27 29 28 30 # shortcut: readonly properties 29 get NAMEfrom var (1)30 get NAME from VARNAME(2)31 get NAME as RETURNTYPE is ACCESSMODIFIER(3)32 get NAME [as RETURNTYPE] [is ACCESSMODIFIER] (4)33 [ ATTRIBUTE]34 [ DOCSTRING]35 GETBLOCK31 get <Name> from var (1) 32 get <Name> from <VarName> (2) 33 get <Name> as <Type> is <AccessModifier> (3) 34 get <Name> [as <Type>] [is <AccessModifier> ] (4) 35 [<Attribute>] 36 [<DocString>] 37 <GetBlock> 36 38 37 39 # shortcut: write-only properties 38 set NAMEfrom var (1)39 set NAME from VARNAME(2)40 set NAME as RETURNTYPE is ACCESSMODIFIER(3)41 set NAME [as RETURNTYPE] [is ACCESSMODIFIER] (4)42 [ ATTRIBUTE]43 [ DOCSTRING]44 SETBLOCK40 set <Name> from var (1) 41 set <Name> from <VarName> (2) 42 set <Name> as <Type> is <AccessModifier> (3) 43 set <Name> [as <Type>] [is <AccessModifier> ] (4) 44 [<Attribute>] 45 [<DocString>] 46 <SetBlock> 45 47 }}} 46 48 … … 48 50 Either the backing is named the same as the property name or has a leading single or double underscore prefix [[BR]] 49 51 The properties type is the same as the backing variable, the access modifiers are defaulted or optionally specified. 50 2. declare a property name mapping onto the '''existing''' declared named backing variable ( VARNAME).[[BR]]52 2. declare a property name mapping onto the '''existing''' declared named backing variable (<VarName>).[[BR]] 51 53 The properties type is the same as the backing variable, the access modifiers are defaulted or optionally specified. 52 54 3. declare a property name mapping onto an '''implicitly''' created private backing variable.[[BR]] … … 62 64 63 65 For all the above 64 "is ACCESSMODIFIER" can be on the same line or the next. (see AccessModifiers )[[BR]]66 "is <!AccessModifier>" can be on the same line or the next. (see AccessModifiers )[[BR]] 65 67 wiki:Attributes and a wiki:Docstring can be optionally provided ( indented on following lines). 66 68