Yep!
That was my problem!
Thank you very much!
Still doesn't understand this 'reference' thing.
Why sets the same value to every 0->i indexes the poke names i temp?
It's a well known feature of REBOL, in that as much as possible, it doesn't copy information, but
binds it.
I used the term reference, but it's not actually correct, sorry.It's not really a reference or a pointer as in C, because there's no symbol involved. The block is simply situated at a specific memory location and that is enough to refer to it in REBOL. I know the gurus will have a more elaborate and correct explanation, as I don't entirely know the internals of REBOL. ;-)
This makes it possible to manipulate series (blocks, strings, etc.) directly inside a block and it will truly be changed everywhere it's bound to and this can help skip over cases where you'd need to treat the block as a separate variable.
For example:
>> a: ""
== ""
>> head insert a 5
== "5"
>> b: reduce [a a]
== ["5" "5"]
This shouldn't surprise you, because you'd expect the reduction to give the contents of 'a inside the block.
But: the two strings in the block are in fact
the very same string! The same string stored in the same memory location, just represented in two different places in a block.
Now you can do this:
>> head insert a 1
== "51"
>> b
== ["51" "51"]
Notice that I didn't call 'reduce. I didn't redefine the block. The contents just change, because the contents have changed at the memory location, that both entries in the block are looking at.
We can actually prove this:
>> same? b/1 b/2
== true
>> same? a b/1
== true
Why is this a feature? Because it gives speed and leverage. :-) Using it more in depth allows you to skip variable maintenance and shorten your code.
But it can be difficult to manage. Let's redefine 'a:
>> a: "7"
== "7"
>> b
== ["51" "51"]
When 'a was redefined, the binding to that memory location was lost. The binding still exists inside the block though and you can reconnect it:
>> a: b/1
== "51"
>> head insert a 7
== "751"
>> b
== ["751" 751"]
As another feature, you can define a block and manipulate it in place without ever assigning a variable to it.
>> repeat i 5 [append [] i]
== [1 2 3 4 5]
Hope this helps a bit.