Previous Topic: $TIMER()

Next Topic: ALIGN()

$WHEREFROM()

Use the $WHEREFROM() function to determine the IMOD and statement number responsible for calling the current IMOD. This is useful in debugging invalid calls to common routines.

Syntax

The $WHEREFROM() function has this syntax:

line imodname = $WHEREFROM()

Arguments

The $WHEREFROM() function takes these arguments:

line

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

imodname

Name of the parent IMOD.

Return Codes

The $WHEREFROM() function produces these 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