Compile-time calculation: Difference between revisions

m
→‎{{header|REXX}}: removed incorrect tag, added internal HTML comments.
m (→‎{{header|REXX}}: removed incorrect tag, added internal HTML comments.)
Line 851:
 
=={{header|REXX}}==
{{incorrect|REXX|Runtime != compile time, even for an interpreted language. If your language doesn't have a compilation phase, then it is not eligible for this challenge.}}
Since REXX is an interpreted language, run time is compile time.
<lang rexx>/*REXX program to compute 10!*/ say '10! =' !(10); exit
 
<!--
!: procedure; !=1; do j=2 to arg(1); !=!*j; end; return !</lang>
 
There is no mention of ''non-eligibility'' for this task in this Rosetta Code task requirements or prologue.
 
This Rosetta Code task did NOT restrict any language from solving this task, nor did it mention what wasn't
eligible. Rosetta Code is a place for solutions, not exclusions. This is a place to show various languages solve (programming) problems and to compare their approaches and solutions.
 
REXX does have a compiler (for the OS and VM mainframes, as well as "compile" Personal REXX [the /C option], along with some other REXXes).
 
This REXX example accomplished the task of computing '''10!''' at compile time (or interpreted time), exactly as this task requested.
 
There is no need to fix the REXX code, it works as intended.
 
There are plenty other interpreted programs that are entered for this Rosetta Code problem, as well as
Mathematica, most BASICs, OCaml and Oforth seem to fall in the middle. I'm sure that there are other interpreters as well.
 
-- ~~~~
 
-->
 
Since REXX is an interpreted language &nbsp; (as are other languages entered for this Rosetta Code task), &nbsp; run time is compile time.
<lang rexx>/*REXX program to compute 10!*/ say '10! =' !(10); exit
 
!: procedure; !=1; do j=2 to arg(1); !=!*j; end; return !</lang>
'''output'''
<pre>