Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Changes between Version 2 and Version 3 of DeclaringVariables

Show
Ignore:
Author:
nascent (IP: 67.110.217.136)
Timestamp:
05/30/10 20:08:39 (11 years ago)
Comment:

Updated to be version agnostic.

Legend:

Unmodified
Added
Removed
Modified
  • DeclaringVariables

    v2 v3  
    1111    int myInteger; 
    1212    double myDouble; 
    13     bit myBit; 
    14     char[] myString; 
     13    bool myBit; 
     14    string myString; 
    1515} 
    1616}}} 
    1717 
    18 = bit versus bool
     18== D1.x vs D2.x =
    1919 
    20 Somewhere along the line, '''bit''' has been deprecated and is now obsolete and eliminated.  In D 2.0 (alpha), use '''bool''', which can be '''false''' (0, and the init value) or '''true''' (1)
     20In version 1 of D, 'string' is an alias for 'char[]' and in version 2 'string' is an alias for 'immutable(char)[]'