* [EMAIL PROTECTED] <[EMAIL PROTECTED]> [031230 12:11]:
> 
> Hi List
> 
> As I was reading "Make-doc.r" from Carl Sassenrath, I came upon a
> construction I had not noticed before. Or perhaps, I had not noticed
> how important it was before.
> 
> Nothing new for a lot of you, but ... I think it's cool to see some
> Rebol code once and a while on this list.
> 
> 8< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> 
> Rebol [
>         date: 30-12-2003
>         purpose: { FAQ
>         Q - "how to export a function from a context?"
>         A - "by using SET. SET always define a global word" }
> ]
> 
> private-room: context [
>         a: b: 2
>         set 'public-fn func [][print [a]] 
> ]
 
  Hiya Patrick:
    Here's a different approach:
    Remove the assignment to 'private-room
  Now you have
 context [
         a: b: 2
         set 'public-fn func [][print [a]] 
 ]
 At this time, 'public-fn is still 'public'
 but 'a, 'b are now 'hidden', inaccessible from
 the outside world.
 but of course, you can't make copies of the function.
 tj

> a: "Some text"
> 
> print [a]       ; ==Some text 
> public-fn       ; 2
> 
> 8< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> 
> And finally, I will borrow my whishes from the new year from Freddie
> Mercury.
> 
> "The one thing we're all waiting for is peace on earth - an end
> to war. It's a miracle we need - the miracle"
> 
> -- 
> Best regards,
> Patrick
> 
> -- 
> To unsubscribe from this list, just send an email to
> [EMAIL PROTECTED] with unsubscribe as the subject.

-- 
Tim Johnson <[EMAIL PROTECTED]>
      http://www.alaska-internet-solutions.com
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

Reply via email to