Product Site

5.4.20.11. type

Returns the type of invocation for this stack frame. Possible values are:
PROGRAM

The stack frame is the top level of a program.
METHOD

The stack frame is a method invocation.
ROUTINE

The stack frame is a routine invocation.
INTERPRET

The stack frame is code created by an INTERPRET instruction.
INTERNALCALL

The stack frame is a subroutine or function call to an internal label.
COMPILE

The stack frame for compiling Rexx code for execution. Many syntax errors will be reported by a COMPILE frame.

Example 5.313. StackFrame class — type method
interpret "call level2" 21

::routine level2
  call level3 31, 32
  return

  level3: procedure
    signal on syntax
    .Method~new("", "~~")
    return

    syntax:
    do f over condition("o")["STACKFRAMES"]
      say (f~type f~name"("f~arguments~makeString(, ",")")")~left(27) f~line":" -
       f~traceLine~strip
    end

may output
COMPILE ()                  1: 1 *-* ~~
METHOD NEW(,~~)             The NIL object: *-* Compiled method "NEW" with scope "Method".
INTERNALCALL LEVEL3(31,32)  9: 9 *-*   .Method~new("", "~~")
ROUTINE LEVEL2(21)          4: 4 *-* call level3 31, 32
INTERPRET ()                1: 1 *-*   call level2 21
PROGRAM C:\stackFrame.rex() 1: 1 *-* interpret "call level2" 21