Rebol Talk Forum  |  Getting Started  |  Newbie Help  |  Topic: problem of context
Pages: [1] Print
Author Topic: problem of context  (Read 281 times)
Guest
Guest


Email
problem of context
« on: April 06, 2005, 11:27:40 AM »

a: context [
b: []
f: func [l c] [b: copy l
bind l 'f
bind c 'f
use b [
do c
]]]


>> e
** Script Error: e has no value
** Near: e
>> a/f [e] [e: 1]
== 1
>> e
== 1
>> unset 'e
>> use a/b  [do [e: 2]]
== 2
>> e
** Script Error: e has no value
** Near: e
>>

why the first example doesn't work, how can i do not to have e created?
Logged
Gabriele
Full Member
***
Offline Offline

Posts: 182


View Profile WWW
problem of context
« Reply #1 on: April 07, 2005, 07:53:57 AM »

In you example, it is not clear what would the difference be between using:

Code:
use [e] [e: 1]

and using:

Code:
a/f [e] [e: 1]

What do you need to do exactly?
« Last Edit: April 07, 2005, 07:54:11 AM by Gabriele » Logged
Guest
Guest


Email
problem of context
« Reply #2 on: April 13, 2005, 05:21:36 AM »

the difference between the two examples is that in the first one it does'nt work, e is not set as a local variable as in the second example
Logged
Gabriele
Full Member
***
Offline Offline

Posts: 182


View Profile WWW
problem of context
« Reply #3 on: April 14, 2005, 11:40:50 AM »

Yes, I get that (and I know why it doesn't work, too - BTW, there has been a thread about this in the mailing list, you should probably check it out). But, why do you need it to work that way? Can't you just use the USE function?
Logged
Pages: [1] Print 
Rebol Talk Forum  |  Getting Started  |  Newbie Help  |  Topic: problem of context
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 20, 2008, 11:05:56 PM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2287 Posts in 593 Topics by 3729 Members
Latest Member: Cibjlmwr

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc