Wiki

Changes between Version 1 and Version 2 of C

Show
Ignore:
Timestamp:
05/02/08 13:44:14 (17 years ago)
Author:
hopscc
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • C

    v1 v2  
    2626 * instance variable optionally prefixed with _ (implicitly makes them private). If so prefixed can be accessed directly in methods 
    2727 * methods (and properties) invoked with leading '''this.''' or more usually just '''.'''. 
     28 * constructor method called init, has no return value 
    2829  
    2930 * String type accessed as '''string''' rather than '''String''' 
     
    3536 * Variable specification - typing, access modifiers, argument attributes  by keyword 'as' rather than C-like syntax 
    3637    * e.g. x as int32, instVar as string public 
    37  * typecasting by keyword 'to' as in 'x to Type' rather than (Type)x 
    38  * 'as shared' to declare a static type 
     38 * typecasting by keyword '''to''' as in 'x to Type' rather than '(Type)x' 
     39    * cast to and away from nilable Type. 
     40 * '''as shared''' to declare a static type 
    3941 
    4042 * '''<>''' instead of '''!=''' for 'not equals' comparisons 
    41  * '''nil''' for null value 
     43 * '''nil''' for no object (null) value 
    4244 * Supports +=, -=, etc. It does not support ++ or -- unary operators ( use += 1 and -= 1 instead). 
    4345  
     
    4850 
    4951 * Strings delimited by single or double quotes, normal range of \c expansion ( e.g \n, \t) 
    50  * Substitute expressions (values) directly in strings with []. 
     52 * Substitute expressions (values) directly in strings by enclosing with []. 
    5153    * such expressions can have optional String.format specification 
    5254 * 'Raw' Strings (r"a raw string") no escape sequence expansion 
    5355 * '!NoSubstitution' strings ( ns" no substitution [done] here")  
    54  * !DocStrings on classes and methods 
     56 * !DocStrings on Programs, classes, Instane variables, methods and properties 
    5557 * Different syntax for characters c'x' 
    5658 
     
    6163    *  e.g def doCalc( start as int) as int    instead of   int doCalc( int start) 
    6264 * '''use''' keyword instead of 'using' to get access to a non default namespace 
     65 * ''' branch... on, on, [else]''' statement rather than c# '''case''' statement  
    6366 
    6467 * Slicing syntax for sequences (Lists and Strings) [start:stop:step] as well as normal library subsequence methods (substring, range, ...)