Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Adding functions to an object.

From: arolls::idatam::com::au at: 28-Feb-2002 5:27

Thankyou all for your ideas, I will see what I can come up with. If you want to look at my include func, I uploaded it here: This was the closest to my situation. I was encapsulating all my library functions in an object.
> Another way, if objects are important, is: > > ; Object-code.r > make object! [ > Local: none > Func-one: func [] [] > ] > > ; Main code > o: make do %Object-code.r [ > MyCustomValue: 123 > ; and so on. > ] > > Note that in both cases, only one function! or object! value is in the > included file. If you need more, use more files, or use an object. > Andrew Martin
I wish the anonymous context from which the include function is called could be accessible and modifiable from within the include function. Nevermind too much, the include function is quite usable as is. Just it would be nice... Anton.