Wiki

Changes between Version 5 and Version 6 of Classes

Show
Ignore:
Timestamp:
08/13/08 08:20:16 (16 years ago)
Author:
hopscc
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Classes

    v5 v6  
    7878}}} 
    7979 
     80All Class and Instance variable names must start with a lowerCase Letter[[BR]] 
     81 
    8082If the name is prefixed with an '''_''' its accessType defaults to ''protected'' and it is directly accessable from within the class method code.[[BR]] 
    8183 
     
    8385it must be accessed from within method code by prefixing the name with either '''this.''' or just '''.''' .[[BR]] 
    8486 
    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 
     87In either case the default [wiki:AccessModifier accessModifier] setting can be adjusted with an accessModifier clause.[[BR]] 
    8788 
    8889Class (or static) variables are specified with the access Modifier  '''shared''' as in '''is shared''' 
     
    112113 
    113114== Methods == 
    114  
    115 Methods are defined using the keyword '''def''' 
     115Methods are defined using the keyword '''def'''. 
     116 
     117If not specified the returnType is void ( i.e nothing returned)  and the [wiki:AccessModifiers access modifiers]  are '''public, virtual'''[[BR]] 
     118 
     119Like 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 
     121Without that prefix on the name the methods  the accessType is ''public, virtual'' and  
     122it 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 
    116128 
    117129=== Method Grammar === 
    118130{{{ 
    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}}}  
    121138 
    122139The initializer or constructor method of a class is a special method called '''init''' which is implicitly called when a class instance is constructed.