Changes between Version 5 and Version 6 of Classes
- Timestamp:
- 08/13/08 08:20:16 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Classes
v5 v6 78 78 }}} 79 79 80 All Class and Instance variable names must start with a lowerCase Letter[[BR]] 81 80 82 If the name is prefixed with an '''_''' its accessType defaults to ''protected'' and it is directly accessable from within the class method code.[[BR]] 81 83 … … 83 85 it must be accessed from within method code by prefixing the name with either '''this.''' or just '''.''' .[[BR]] 84 86 85 In either case the default accessModifier setting can be adjusted with an accessModifier clause.[[BR]] 86 All Class and Instance variable names must start with a lowerCase Letter 87 In either case the default [wiki:AccessModifier accessModifier] setting can be adjusted with an accessModifier clause.[[BR]] 87 88 88 89 Class (or static) variables are specified with the access Modifier '''shared''' as in '''is shared''' … … 112 113 113 114 == Methods == 114 115 Methods are defined using the keyword '''def''' 115 Methods are defined using the keyword '''def'''. 116 117 If not specified the returnType is void ( i.e nothing returned) and the [wiki:AccessModifiers access modifiers] are '''public, virtual'''[[BR]] 118 119 Like variables if the name is prefixed with an '''_''' its access modifier defaults to ''protected'' and it is directly accessable from within the class method code.[[BR]] 120 121 Without that prefix on the name the methods the accessType is ''public, virtual'' and 122 it must be accessed from within method code by prefixing the name with either '''this.''' or just '''.''' .[[BR]] 123 124 +++TBD+++ paramlist[[BR]] 125 126 +++TBD+++ Generics 127 116 128 117 129 === Method Grammar === 118 130 {{{ 119 ++TBDone 120 }}} 131 def <methodName> [as <returnType>] [is <AccessModifiers>] 132 [has <Attributes>] 133 [<DocString>] 134 def <methodName>(<paramList>) [as <returnType>] [is <AccessModifiers>] 135 [has <Attributes>] 136 [<DocString>] 137 }}} 121 138 122 139 The initializer or constructor method of a class is a special method called '''init''' which is implicitly called when a class instance is constructed.