[REBOL] Re: Improved SOURCE function
From: larry:ecotope at: 5-May-2001 23:32
Hi Blaz
> I grabbed the src.r script, put it in my rebol directory, and ran
> src.r, with the following result...
>
> >> system/version
> == 1.1.0.1.1
> >> src system
> <no further output>
Sorry about that. In this case, SRC is just calling the the built-in SOURCE
function and it is that function which appears to lock up. In other words,
we get the same result as:
source system ; just don't do this
The apparent lockup (eventually you get something, if you don't run out of
memory) is because the MOLD function has some difficulties with recursive
references in the system object. However, these will work quickly:
src system/view
src/system/view/vid
but the output is too long for anything but a file capture. And the
recursive references are output as [...] .
The best way to explore the system object is to use Doc Kimbel's help.r to
browse the system object and sub-objects. When you see a function in the
object that is interesting, use SRC to see the coide, because help does not
show the function source code. Either can be used to see other types of
values in objects.
There is a slightly updated version on my rebsite:
http://www.nwlink.com/~ecotope1/reb/src.r
Regards
-Larry