Runtime evaluation: Difference between revisions

Content added Content deleted
(→‎{{header|ooRexx}}: Add example for ooRexx)
m (→‎{{header|REXX}}: removed superflous blanks. -- ~~~~)
Line 525: Line 525:
<br> 1) run-time evaluation of an internal expression, and a
<br> 1) run-time evaluation of an internal expression, and a
<br> 2) run-time evaluation of a user-prompted expression.
<br> 2) run-time evaluation of a user-prompted expression.
<lang rexx>/*REXX program to illustrate ability to execute code written at runtime.*/
<lang rexx>
/*REXX program to illustrate ability to execute code written at runtime.*/

numeric digits 10000000
numeric digits 10000000
bee=51
bee=51
Line 546: Line 544:
say 'length of result='length(?)
say 'length of result='length(?)
say ' left 50 bytes of result='left(?,50)'...'
say ' left 50 bytes of result='left(?,50)'...'
say 'right 50 bytes of result=...'right(?,50)
say 'right 50 bytes of result=...'right(?,50)</lang>
'''output''' with the input of: <tt> 2**44497 - 1 </tt>
</lang>
Output [with the user entering: <tt> 2**44497 - 1 </tt> ]
<br>which happens to be the 27th Mersenne prime.
<br>which happens to be the 27th Mersenne prime.
<pre style="height:35ex;overflow:scroll">
<pre style="height:35ex;overflow:scroll">