Missatge de Jean Louis Faucher <jfaucher...@gmail.com> del dia dc., 22 de
maig 2024 a les 0:29:

> (snip)
> That's useful when needing only a local trace in a few methods, instead of
> a full trace at package level.
> I have some methods where I do that:
> ::method myMethod
>     use strict arg <some arguments>, trace=.false
>     if trace then .traceOutput~say("       >I> Method .myClass~myMethod")
>     if trace then trace i
>     ...
>
> If we implement the retro-trace then
> - I can remove the display of >I> from my code.
> - We retrieve the symmetry advocated by Josep Maria.
>
> To have a consistent trace, the retro-trace should be activated only if
> the trace instruction is the first instruction (or the second if the first
> instruction is an expose).
>

I like it. As it always happens, though, the devil is in the details. Take
your own example, and assume that we have implemented TRACE as you describe
it, and that you have removed the display of ">I>". Your code would now
amount to

::method myMethod
    use strict arg <some arguments>, trace=.false
    if trace then trace i


and then the TRACE instruction would be the THEN branch of an IF that
followed a USE instruction, and therefore it would not activate the
retro-trace (not the first instruction, nor the second after an EXPOSE).

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

Reply via email to