Jump to content

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') /*add a function lib.*/
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() /*Y now contains 2 numbers: rows cols */
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>
'''{{out|output''' |text=&nbsp; (which happens to reflect the program's author's particular screen size for the "DOS" window):}}
<pre>
rows= 62
Cookies help us deliver our services. By using our services, you agree to our use of cookies.