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 LocalesExample

Show
Ignore:
Author:
nascent (IP: 67.110.217.136)
Timestamp:
05/31/10 20:58:32 (11 years ago)
Comment:

UPdated to be version agnostic.

Legend:

Unmodified
Added
Removed
Modified
  • LocalesExample

    v2 v3  
    1313version(English)   
    1414{ 
    15     const char[] salutation = "Hi"; 
    16     const char[] negative = "No"; 
     15    const string salutation = "Hi"; 
     16    const string negative = "No"; 
    1717} 
    1818 
    1919version(Espanol)  
    2020{ 
    21     const char[] salutation = "Hola"; 
    22     const char[] negative = "No"; 
     21    const string salutation = "Hola"; 
     22    const string negative = "No"; 
    2323}  
    2424 
    2525version(Francais) 
    2626{ 
    27     const char[] salutation = "Bonjour"; 
    28     const char[] negative = "Non"; 
     27    const string salutation = "Bonjour"; 
     28    const string negative = "Non"; 
    2929}  
    3030 
    3131version(Deutsch)   
    3232{ 
    33     const char[] salutation = "Hallo"; 
    34     const char[] negative = "Nein"; 
     33    const string salutation = "Hallo"; 
     34    const string negative = "Nein"; 
    3535}  
    3636 
    3737int main() 
    3838{  
    39     printf("%.*s\n", salutation); 
     39    writef("%s\n", salutation); 
    4040    return 0; 
    4141}