Call a function in a shared library: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: added a comment to the REXX section header.) |
m (→{{header|REXX}}: changed capitalization and some comments, changed whitespace.) |
||
Line 1,626: | Line 1,626: | ||
The dropping of functions isn't really necessary for most REXX programs. |
The dropping of functions isn't really necessary for most REXX programs. |
||
<lang rexx>/*REXX program calls a function (sysTextScreenSize) in a shared library ( |
<lang rexx>/*REXX program calls a function (sysTextScreenSize) in a shared library (regUtil). */ |
||
rca= rxFuncAdd(' |
rca= rxFuncAdd('sysLoadFuncs', "regUtil", 'sysLoadFuncs') /*add a function library. */ |
||
if rca\==0 then do /*examine the return code.*/ |
if rca\==0 then do /*examine the return code.*/ |
||
say 'return code' rca "from rxFuncAdd" /*tell about bad " " */ |
say 'return code' rca "from rxFuncAdd" /*tell about bad " " */ |
||
Line 1,640: | Line 1,640: | ||
end |
end |
||
/* [↓] call a |
/* [↓] call a function. */ |
||
$= sysTextScreenSize() /*$ has 2 words: rows cols */ |
|||
parse var |
parse var $ rows cols . /*get two numeric words in $.*/ |
||
say 'rows=' rows /* |
say ' rows=' rows /*show number of screen rows.*/ |
||
say 'cols=' cols |
say ' cols=' cols /* " " " " cols.*/ |
||
rcd= SysDropFuncs() |
rcd= SysDropFuncs() /*make functions inaccessible*/ |
||
if rcd\==0 then do /*examine the return code.*/ |
if rcd\==0 then do /*examine the return code.*/ |
||
say 'return code' rcd "from sysDropFuncs" /*tell about bad " " */ |
say 'return code' rcd "from sysDropFuncs" /*tell about bad " " */ |
||
Line 1,654: | Line 1,654: | ||
{{out|output|text= (which happens to reflect the program's author's particular screen size for the "DOS" window):}} |
{{out|output|text= (which happens to reflect the program's author's particular screen size for the "DOS" window):}} |
||
<pre> |
<pre> |
||
rows= 62 |
rows= 62 |
||
cols= 96 |
cols= 96 |
||
</pre> |
</pre> |
||