Volker wrote:
> Is it possible to access local vars from outside?
> To view values for debugging?

I don't think so. But a function could be written to supply an object with
the function local arguments as member variables. The /local refinement is
removed as are the local arguments, so that a new function is formed as a
member function in an object. For example, this:

        f: func [c /local a b] [b: 2 a: 1]

    transforms into:

        f: make object! [
            a: b: none
            f: func [c] [b: 2 a: 1]
            ]

    and instead of:

        f 1

    this:

        f/f 1
    then the "local" variables can be accessed as:
        f/a
    and:
        f/b

The implementation is left as an exercise for the reader. :-)

Andrew Martin
Making white boxes...
ICQ: 26227169
http://members.xoom.com/AndrewMartin/
-><-

Reply via email to