Anonymous user
Call a function in a shared library: Difference between revisions
m
→{{header|REXX}}: added whitespace, used a template for the output section.
(added Ol) |
m (→{{header|REXX}}: added whitespace, used a template for the output section.) |
||
Line 1,623:
The example is using the standard library that is supplied with Regina REXX that contains a wide range of functions.
<lang rexx>/*REXX pgm calls a function (systextscreensize) in a shared library (regutil).*/
z= rxfuncadd('sysloadfuncs', "regutil", 'sysloadfuncs')
if z\==0 then do /*test the return cod*/
say 'return code' z "from rxfuncadd" /*tell about bad RC. */
Line 1,632:
/* [↓] call a particular function. */
y= systextscreensize()
parse var y rows cols . /*obtain the two numeric words in Y. */
say 'rows=' rows /*display the number of (terminal) rows*/
Line 1,638:
call SysDropFuncs /*clean up: make functions inaccessible*/
/*stick a fork in it, we're all done. */</lang>
<pre>
rows= 62
|