Hi Terrence,
you wrote:
>>> load http://rebol.org/file/recursive-dir.r
>load http://rebol.org/file/recursive-dir.r
>connecting to: rebol.org
[...]
>== [
> recursive-files: function [path [file!]] [files file file-list] [
> files: load path
> file-list: to-block 1 ...
>>> recursive-files to-path "/tmp"
>recursive-files to-path "/tmp"
>** Script Error: recursive-files has no value.
>** Where: recursive-files to-path "/tmp"
>>> quit
The reason is that you are using 'load. When you load a function, you get a
block containing the function. The assignment of the word to the function
is not executed:
Given that the file %hi.r contains:
f: func [] [ print "hi" ]
Then loading the file results in:
>> type? load %hi.r
== block!
>> load %hi.r
== [f: func [] [print "hi"]]
Using 'do does have perform the assignment of f to the function:
>> do load %hi.r
>> f
hi
>>
Elan