Compile time function execution...

Derek Parnell derek at nomail.afraid.org
Thu Feb 15 21:38:37 PST 2007


On Thu, 15 Feb 2007 17:52:38 -0700, Russell Lewis wrote:

> 
> import std.stdio;
> void main() {
>    writefln("%d\n", CalculateTheAnswerToLifeUniverseEverything());
> }
> 
> if it took 7.5 million years to run on a supercomputer, how long is it 
> going to take to run on your compiler?

  int CalculateTheAnswerToLifeUniverseEverything() { return 42; }

-- 
Derek
(skype: derek.j.parnell)
Melbourne, Australia
"Justice for David Hicks!"
16/02/2007 4:37:59 PM



More information about the Digitalmars-d mailing list