Some programming languages allow calculation of values at compile time.



Task

Calculate    10!    (ten factorial)   at compile time.

Print the result when the program is run.

Discuss what limitations apply to compile-time calculations in your language.




/*REXX program computes 10! (ten factorial) during REXX's equivalent of "compile─time". */
 
say '10! ='    !(10)
exit                                             /*stick a fork in it,  we're all done. */
/*──────────────────────────────────────────────────────────────────────────────────────*/
!: procedure;  !=1;            do j=2  to arg(1);    !=!*j;    end  /*j*/;        return !