Hi Peter,

I think it's only the naming that confuses you a bit, look
at those to scripts ...

-------- script1.r ---------
REBOL [
    Script: "script1"
]

printa: func [] [
   print "a"
]
printb: func [] [
   print "b"
]

-------- script2.r ---------
REBOL [
    Script: "script2"
]

do %script1

printa
printb
-------- end ---------

With "do %script1.r" script1.r is evaluated, this doesn't
mean that the functions 'printa 'printb are evaluated, but
that the definitions are bound to these words. 
After that you can use them in script2.r .

If you want to use a script as a library be sure to only
write function/variable/object/... definitions.

You can have as many definitions in a script as you like.


I hope this helps,
if you have more questions, feel free to ask them.

regards,

Ingo


Those were the words of [EMAIL PROTECTED]:
> At 15:51 2000-05-18 +0200, you wrote:
> 
> >you must 'do' the file. if you do it the whole file is evaluated
> >
> >try to give each function in a single file
> 
> 
> Hello!
> 
> Are you saying that I have to have only one function in each
> file?!? There must be some way to 'include' a whole script
> and then calling each function separately?
> 
> Best regards,
> Peter Carlsson

--  _     .                                _
ingo@)|_ /|  _| _  <We ARE all ONE   www._|_o _   _ ._ _  
www./_|_) |o(_|(/_  We ARE all FREE> ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/                     ._|      ._|

Reply via email to