Am 10.04.2024 um 17:09 schrieb Chip Davis <c...@aresti.com>:

 Have to admit, Rony's "out-arrows" do make a much more immediately-visible eyecatcher.  Would that be appropriate for "Signal" as well, since it (may) violate the routine nesting structure?
The invocation tracelinr (>I>} gets only triggered if a routine or a method gets invoked. Or with other words if the invocation target is either an instance of the routine or the method class. Internal routines will not trigger it.

The code of a routine or method object may be a fully fledged (oo)Rexx program with internal routines (indicated by a label, i.e. an identifier followed by a colon) which may get signaled or called. Trace label will trace those labels.

—-rony

On 4/10/2024 7:40 AM, Rony G. Flatscher wrote:

Here an example program that uses a routine and methods (and internal routines) for getting an impression on the trace output:

say "hi"
o=.test~new
say "o~hi   :" o~hi
say "o~ho   :" o~ho
say "pp(abc):" pp(abc)

::routine pp
  res=br(arg(1))
  return res
br:
  return "[" || arg(1) || "]"

::class test
::method hi
  return "hi"
::method ho
  res=mbr("ho")
  return res
mbr:
  return pp(arg(1))


-- ::options trace all
::options trace labels

Here the output of "::options trace labels" using "<I<":

hi
       >I> Method "HI" with scope "TEST" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
       <I< Method "HI" with scope "TEST" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
o~hi   : hi
       >I> Method "HO" with scope "TEST" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
    19 *-*   mbr:
       >I> Routine "PP" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
    10 *-*   br:
       <I< Routine "PP" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
       <I< Method "HO" with scope "TEST" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
o~ho   : [ho]
       >I> Routine "PP" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
    10 *-*   br:
       <I< Routine "PP" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
pp(abc): [ABC]

Here the output of "::options trace labels" using ">O>":

hi
       >I> Method "HI" with scope "TEST" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
       >O> Method "HI" with scope "TEST" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
o~hi   : hi
       >I> Method "HO" with scope "TEST" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
    19 *-*   mbr:
       >I> Routine "PP" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
    10 *-*   br:
       >O> Routine "PP" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
       >O> Method "HO" with scope "TEST" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
o~ho   : [ho]
       >I> Routine "PP" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
    10 *-*   br:
       >O> Routine "PP" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
pp(abc): [ABC]

---

Here the output of "::options trace all" using "<I<":

     1 *-* say "hi"
hi
     2 *-* o=.test~new
     3 *-* say "o~hi   :" o~hi
       >I> Method "HI" with scope "TEST" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
    15 *-* return "hi"
       <I< Method "HI" with scope "TEST" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
o~hi   : hi
     4 *-* say "o~ho   :" o~ho
       >I> Method "HO" with scope "TEST" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
    17 *-* res=mbr("ho")
    19 *-*   mbr:
    20 *-*   return pp(arg(1))
       >I> Routine "PP" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
     8 *-* res=br(arg(1))
    10 *-*   br:
    11 *-*   return "[" || arg(1) || "]"
     9 *-* return res
       <I< Routine "PP" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
    18 *-* return res
       <I< Method "HO" with scope "TEST" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
o~ho   : [ho]
     5 *-* say "pp(abc):" pp(abc)
       >I> Routine "PP" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
     8 *-* res=br(arg(1))
    10 *-*   br:
    11 *-*   return "[" || arg(1) || "]"
     9 *-* return res
       <I< Routine "PP" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
pp(abc): [ABC]

Here the output of "::options trace all" using ">O>":

     1 *-* say "hi"
hi
     2 *-* o=.test~new
     3 *-* say "o~hi   :" o~hi
       >I> Method "HI" with scope "TEST" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
    15 *-* return "hi"
       >O> Method "HI" with scope "TEST" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
o~hi   : hi
     4 *-* say "o~ho   :" o~ho
       >I> Method "HO" with scope "TEST" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
    17 *-* res=mbr("ho")
    19 *-*   mbr:
    20 *-*   return pp(arg(1))
       >I> Routine "PP" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
     8 *-* res=br(arg(1))
    10 *-*   br:
    11 *-*   return "[" || arg(1) || "]"
     9 *-* return res
       >O> Routine "PP" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
    18 *-* return res
       >O> Method "HO" with scope "TEST" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
o~ho   : [ho]
     5 *-* say "pp(abc):" pp(abc)
       >I> Routine "PP" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
     8 *-* res=br(arg(1))
    10 *-*   br:
    11 *-*   return "[" || arg(1) || "]"
     9 *-* return res
       >O> Routine "PP" in package "G:\test\orx\trace\examples4docs\hmm\test_labels.rex".
pp(abc): [ABC]

---

Personally I would prefer "<I<" as it indicates exiting the invocation (">I>" is internally dubbed entering invocation) and it would probably make it easier to locate the invocation pairs in simple runs.

So, if you compare the trace output what would you like better, what would you think is more intuitive and maybe easier to spot? After all this is Rexx and should it make as easy as possible on the programmers! :)

---rony





_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to