Test a function: Difference between revisions

Content added Content deleted
m (→‎stress test some REXX BIFs: added whitespace and comments.)
Line 1,799: Line 1,799:
===stress REXX keywords (used as variables)===
===stress REXX keywords (used as variables)===
{This was originally written in some form of FORTRAN.}
{This was originally written in some form of FORTRAN.}
<lang rexx>/* This REXX uses a lot of REXX keywords as variables. */
<lang rexx>/*REXX program stresses various REXX functions (BIFs), many BIFs are used as variables. */
signal=(interpret=value); value=(interpret<parse); do upper=value to value; end

exit=upper*upper*upper*upper-value-upper; say=' '; return=say say say; with.=signal
signal=(interpret=value);value=(interpret<parse);do upper=value to value
do then=value to exit; pull=''; do otherwise= upper to then-,
end;exit=upper*upper*upper*upper-value-upper;say=' ';return=say say say;
value; select=otherwise-value; if.otherwise=with.otherwise+with.select; end
with.=signal;do then=value to exit;pull='';do otherwise=upper to then-,
value;select=otherwise-value;if.otherwise=with.otherwise+with.select;end
if.value=value; if.then=value; do otherwise=value to exit-then; pull=pull,
if.value=value;if.then=value;do otherwise=value to exit-then;pull=pull,
say''say; end; do otherwise=value to then; pull=pull center(if.otherwise,,
say''say;end;do otherwise=value to then;pull=pull center(if.otherwise,,
length(return)); end; say pull; do otherwise=value to exit; with.otherwise=,
if.otherwise; end; end; exit 0 /*stick a fork in it, we're all done. */</lang>
length(return));end;say pull;do otherwise=value to exit;with.otherwise=,
{{out|output|text=''':'''}}
if.otherwise;end;end</lang>
'''output'''
<pre>
<pre>
1
1