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

Changes between Version 4 and Version 5 of ExpressionsExample

Show
Ignore:
Author:
Bloke (IP: 86.160.199.221)
Timestamp:
10/13/09 16:05:04 (10 years ago)
Comment:

%d required to work in D 2.0 tested on dmd 2.033 on WinXP SP3

Legend:

Unmodified
Added
Removed
Modified
  • ExpressionsExample

    v4 v5  
    1717 
    1818    i = 12 * 12; /* multiplication */ 
    19     writefln("12 x 12 = ", i); /* i should be 144 */ 
     19    writefln("12 x 12 = %d", i); /* i should be 144 */ 
    2020 
    2121    j = i / 8; /* division */ 
    22     writefln("144 / 8 = ", j); /* j should be 18 */ 
     22    writefln("144 / 8 = %d", j); /* j should be 18 */ 
    2323 
    2424    i -= 44; /* same as saying "i = i - 44;" */ 
    25     writefln("144 - 44 = ", i); /* i should be 100 */ 
     25    writefln("144 - 44 = %d", i); /* i should be 100 */ 
    2626} 
    2727}}}