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

Changes between Version 1 and Version 2 of FactorialRecursiveTemplateExample

Show
Ignore:
Author:
jcc7 (IP: 192.149.244.9)
Timestamp:
12/13/06 15:17:43 (15 years ago)
Comment:

removed attempt at for loop

Legend:

Unmodified
Added
Removed
Modified
  • FactorialRecursiveTemplateExample

    v1 v2  
    4646    writefln("6! = ", factorial!(6)); 
    4747    writefln("7! = ", factorial!(7)); 
    48  
    49  
    50     /* (I don't understand why the code below doesn't work.) */ 
    51 /+ 
    52     for(int i = 0; i<7; i++) 
    53         writefln("%s! = %s", i, factorial!(i)); 
    54 +/ 
    55     /* Error: Integer constant expression expected instead of i */ 
    56  
    5748} 
    5849}}}