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 WaitExample/D2

Show
Ignore:
Author:
Epileg (IP: 188.119.210.222)
Timestamp:
12/30/10 09:13:15 (10 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WaitExample/D2

    v2 v3  
    1616void main() 
    1717{ 
    18   writeln("Press enter (using 'std.c.stdio.getchar();' to wait) . . ."); 
    19   getchar(); 
     18    writeln("Press enter (using 'std.c.stdio.getchar();' to wait) . . ."); 
     19    getchar(); 
    2020 
    21   version (Windows) 
    22  
    23     writeln("Waiting again\n(using 'system(\"pause\");'):"); 
    24     system("pause"); 
    25  
     21    version (Windows) 
     22   
     23        writeln("Waiting again\n(using 'system(\"pause\");'):"); 
     24        system("pause"); 
     25   
    2626 
    27   version (linux) 
    28  
    29     writeln("Waiting again\n(using 'system(\"read -p \\\"Press enter to continue \\\" nothing;\");'):"); 
    30     system("read -p \"Press enter to continue \" nothing;"); 
    31  
     27    version (linux) 
     28   
     29        writeln("Waiting again\n(using 'system(\"read -p \\\"Press enter to continue \\\" nothing;\");'):"); 
     30        system("read -p \"Press enter to continue \" nothing;"); 
     31   
    3232} 
    3333}}}