REXX Tips & Tricks, Version 2.80


Inf-HTML [About][Toc][Index] 0.9b (c) 1995 Peter Childs


Get a line number at runtime - 2 -





 
/* another code sequence to get the no. of a sourceline at runtime    */
/* Note that this code also functions in compiled REXX programs       */
/* and in REXX programs loaded in the macro space.                    */
/* Usage example:                                                     */
/* You can use this technique in your programs to write an error      */
/* handler which ignores errors in some lines but not in all.         */
/* (see the routines I!.__CallUserProc and I!.__ErrorAbort in     */
/* the TEMPLATE.CMD.)                                                 */

  say "This is the line no. " || GetLineNo() || " of the program."

exit

/* sample routine to return the line number with the call             */
GetLineNo: PROCEDURE expose sigl
  return sigl


  

Inf-HTML End Run - Successful