LINESIZE.REX: Difference between revisions

no edit summary
(added a fast method if Regina REXX is being used to execute the program, added comments, changed whitespace, added more boilerplate (checking for possible errors).)
No edit summary
 
Line 1:
The   '''LINESIZE.REX'''   is a REXX program to emulate the   '''linesize'''   BIF for some REXX programs.
 
<br><br><br>The help for the &nbsp; '''LINESIZE''' &nbsp; REXX program is included here ──► [[LINESIZE.HEL]].
<langsyntaxhighlight lang="rexx">/*REXX program find the LINESIZE (of the console/terminal) when in MS Windows or DOS.*/
 
trace off
Line 163 ⟶ 164:
s: if arg(1)==1 then return arg(3); return word( arg(2) 's', 1)
shorten: procedure; parse arg a,n; return left(a, max(0, length(a) - p(n 1) ) )
syntax: !sigl= sigl; call er 13,!fid(2) !fid(3) !sigl !cal() condition('D') sourceline(!sigl)</langsyntaxhighlight>
 
[[Category:REXX library routines]]