Hi Tiana--
In your code below, n is a *reference* to 2, it's not actually 2. 
In REBOL 2.2, the quick way to get what your looking for is:

blk/:n

The colon (or "get" notation) ensures that the refinement "/n" deals
with the value associated with n, rather than the reference.

I admit it's a little confusing at first, but the different notations
(put in the context of your example:) 
  n   
  :n  
  'n
are actually part of the foundation for REBOL's expressive power. Once
you get used to these nuances and understand why words (REBOL's term for
n in your example) are references and not variables or value
"containers", it'll all start to click. 

Check the manuals for more details on the "zen" of REBOL. Several books
are planned for publication that will also help folks make the
mind-shift.
Cheers,
Ed

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, February 08, 2000 11:19 AM
> To:   [EMAIL PROTECTED]
> Subject:      [REBOL] NEED Help on a very SIMPLE script
> 
> Hello,
> 
> I wrote a very very simple script, I wanna to retrieve the specific
> value of a
> block by passing a variable instead of specify the block number to it:
> 
> 
> Rebol [blablabla]
> blk: [1 2 3 4 5]
> n: 2
> blk/n
> 
> the error message is the following:
> ** Script Error: Invalid path value: n.
> ** Where: blk/n
> 
> Your help will be highly appreciated.
> 
> Tiana 

Reply via email to