Previous Topic: $TIMER()Next Topic: ALIGN()


$WHEREFROM()

This function determines the IMOD and statement number responsible for calling the current IMOD. This is useful in debugging invalid calls to common routines.

Syntax

line imodname = $WHEREFROM()

Parameters

line

Line number in the parent IMOD responsible for invoking the currently executing IMOD.

imodname

Name of the parent IMOD.

Return Codes

120

NOT CALLED FROM IMOD

Example

  signal on syntax                   /* set trap */
  parse arg w1 w2 w3 .               /* begin processing */
  ...
  ...
 syntax:                              /* trap code */
  say 'Error' rc 'on line' sigl      /* show location of error */
  say 'IMOD called from $wherefrom() /* show source of call */
  return