Special variables: Difference between revisions

Content deleted Content added
adding maxima
→‎{{header|REXX}}: added REXX examples. -- ~~~~
Line 1,052:
* SIGL [the source line # that did the transfer of control.]
 
In each case, the variable names may be in lower/upper/mixed case.
<lang rexx>/*REXX program to demonstrate REXX special variables: RC, RESULT, SIGL. */
/*line two. */
/*line three.*/ say copies('=',75)
rc=1/3 /*line four. */
signal youWho /*line five. */
myLoo='this got skipped' /*line six. */
youwho: /*line seven.*/
say 'SIGL=' sigl
say 'REXX source statement' SIGL '=' sourceline(sigl)
say copies('=',75)
g=44
call someFunc g
say 'rc=' rc
say 'result=' result
say copies('=',75)
h=66
hh=someFunc(h)
say 'rc=' rc
say 'result=' result
say 'hh=' hh
say copies('=',75)
'DIR C:\ /ad | find /i /v "Volume " '
say 'rc=' rc
say 'result=' result
say copies('=',75)
exit
/*───────────────────────────────────someFunc subroutine.───────────────*/
someFunc: procedure; parse arg x; return x/2</lang>
'''output'''
<pre style="overflow:scroll">
===========================================================================
SIGL= 5
REXX source statement 5 = signal youWho /*line five. */
===========================================================================
rc= 0.333333333
result= 22
===========================================================================
rc= 0.333333333
result= 22
hh= 33
===========================================================================
 
Directory of C:\
 
04/26/2012 01:51 <DIR> bigFacts
12/16/2005 19:54 <DIR> Documents and Settings
04/26/2012 01:51 <DIR> gon
12/16/2005 20:16 <DIR> Program Files
04/14/2010 19:58 <DIR> Recycled
12/16/2005 19:42 <DIR> WINDOWS
0 File(s) 0 bytes
7 Dir(s) 4,697,964,544 bytes free
rc= 0
result= 22
===========================================================================
</pre>
 
=={{header|Tcl}}==