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 EndlessForLoopExample

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

Updated to be version agnostic.

Legend:

Unmodified
Added
Removed
Modified
  • EndlessForLoopExample

    v2 v3  
    1717        if( /*condition met */ ) 
    1818        { 
    19             printf("You entered the correct answer.\n"); 
     19            writef("You entered the correct answer.\n"); 
    2020            break; // exits the endless loop 
    2121        } 
    2323        { 
    2424            // do something like print an error message 
    25             printf("Sorry, try again\n"); // after this, we go over from the start 
     25            writef("Sorry, try again\n"); // after this, we go over from the start 
    2626        } 
    2727    } 
    28     printf("Bye!"); 
     28    writef("Bye!"); 
    2929} 
    3030}}}