Selective to-(data-type) Howto?|more
[1/3] from: tim::johnsons-web::com at: 13-Jul-2001 15:19
Thanks Jeff:
Sorry to not explain so well...... let me try again:
1)the rebol word 'what prints a list of globally-defined functions
2)It occurs to me that if I can collect that list into a 'block,
I can parse out all of the functions beginning with {to-}.
How may I do that?
thnx
tim
On Fri, Jul 13, 2001 at 03:10:08PM -0700, Jeff Kreis wrote:
> Howdy, Tim:
> > I can do this:
<<quoted lines omitted: 22>>
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.
--
Tim Johnson <[tim--johnsons-web--com]>
http://www.johnsons-web.com
[2/3] from: arolls:bigpond:au at: 14-Jul-2001 15:42
> 1)the rebol word 'what prints a list of globally-defined functions
> 2)It occurs to me that if I can collect that list into a 'block,
> I can parse out all of the functions beginning with {to-}.
foreach word first system/words [
if all [
p: find to-string word "to-"
1 = index? p
][
print word
]
]
If you want to get the function body
of the functions, you can see how the
mezzanine function 'what does it.
("mezzanine" meaning made from rebol code.
Compare to print, which is a native.)
Examine 'what like this:
>> ?? what
what: func [
"Prints a list of globally-defined functions."
/local vals args here total
][
total: copy []
vals: second system/words
foreach word first system/words [
if any-function? first vals [
args: first first vals
if here: find args /local [args: copy/part args here]
append total reduce [word mold args]
]
vals: next vals
]
foreach [word args] sort/skip total 2 [print [word args]]
exit
]
[3/3] from: tim:johnsons-web at: 14-Jul-2001 9:22
Thanks Anton:
> foreach word first system/words [
> if all [
<<quoted lines omitted: 4>>
> ]
> ]
Yes. I had deduced that from using >>source what
> If you want to get the function body
> of the functions, you can see how the
> mezzanine function 'what does it.
> ("mezzanine" meaning made from rebol code.
> Compare to print, which is a native.)
Are mezzanine functions generated dynamically when rebol starts?
I have read many references to them, but this hasn't really sunk
in. None of the files in core42.tar.gz have any source code for
mezzanine functions in them.
thanks for
the continuing edification :>)
tim
> Examine 'what like this:
> >> ?? what
<<quoted lines omitted: 16>>
> ]
> --
--
Tim Johnson <[tim--johnsons-web--com]>
http://www.johnsons-web.com
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted







