but that is slim's PRIMARY function. ;-)
another way to do a simple loaded namespace is like so: mod: load/all mod: context mod and you have yourself a block of code within an object. note this is untested, but should work IIRC. -MAx --- "You can either be part of the problem or part of the solution, but in the end, being part of the problem is much more fun." > -----Original Message----- > From: Bruno G. Albuquerque [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 31, 2004 12:27 PM > To: [EMAIL PROTECTED] > Subject: [REBOL] Re: Source code modules. > > > > Hey Gregg. > > Please do. Unfortunatelly what I need is a lot simpler than what STELL > provides so there is no point in using it (although STEEL looks really > cool). > > I guess the real problem I have is that I don't know how to > "include" the > code that is in a module file in a way it would be bound to a > context. For > instance, I would like to create a file that would have the following > function defind on it: > > test: func [ ] [ > print "Hello" > ] > > And I would like to load it inside a context so I could do > something like: > > test-context: context [ > ; The test function should be here somehow > ] > > And then, be able to do: > > test-context/test > > And get the desired results. > > Thanks. > > -Bruno > > Gregg Irwin disse: > > > > Hi Bruno, > > > > BGA> So, I am working on one project where I will need a > way to create > > BGA> "modules" of Rebol code that will be loaded by a main > script. How > > would I BGA> go about loading those modules from disk in a way that > > would be easy to BGA> access that code in the main script? > > > > If you have the flexibility to experiment, please do give Max's SLIM > > library concept a try. I'd like to see more people play > with it and post > > some feedback to the list. > > > > It's not hard to write a "loader" that brings all your > modules in and > > binds them to a context (I called mine 'lib), and if each > module keeps > > everything in *its* own context, you end up with an nice > hierarchical > > library structure. I can post mine if you want. > > > > Other people (e.g. Ladislav) have nice INCLUDE functions, and of > > course there's PREBOL from RT. > > > > -- Gregg > > > > -- > > To unsubscribe from this list, just send an email to > > [EMAIL PROTECTED] with unsubscribe as the subject. > > > > -- > To unsubscribe from this list, just send an email to > [EMAIL PROTECTED] with unsubscribe as the subject. > > -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.