Hi,

        I am not sure just how you wanted to have 'array/initial work, but at first 
thought you would probably need to redefine 'array or create your own 
function.  On the other hand it looked like you just might want this:

 a: array [3 2] [10 60 10]

        But you did say *increment* so I am not sure. ;-)  If you literally did want 
an incremented value, then yes you will probably need to use loops.  But you 
might want to create your own generic function to do it if you like 
incremented arrays. ;-)

        I thought that I had some light to shed on *contexts* but it appears that my 
light has faded. ;-(  I would play with different combinations of 'compose 
and 'bind to try to find what I was looking for.  I have done some bind 
stuff, but ended up writing my own version of bind to get what I was looking 
for...

HTH
Ammon


On Wednesday 26 June 2002 06:48 pm, you wrote:
> Hello,
>
> As I tried to generate a dynamic line of code to create a way  to
> circumvent the way REBOL interprets the ARRAY notation when used with
> variable indexes instead of numeric constants (nothing really hard with
> REBOL), I found some limitation with the initialize refinement as following
> : It seems only possible to use the same constant (a scalar value or any
> other datatype seems to be is accepted) as the initial value used by the
> Array word itself.
>
> Here is my example code ( I tried it directly at the concole) :
>
> tab_nbr: array/initial  [3 2]  0     cells contents are all initialized to
> the 0 value
> L: 2
> C: 1
>  tab_nbr/2/1: 10                        cell content [2 1] is updated to 10
> print tab_nbr/:L/:C                    I verify that all is OK
>
> tab_nbr/:L/:C: 20                        But this one doesn't work, so I
> dynamically generated the real line and asked
>                                                   REBOL to execute it.
>                                                   The wanted expression was
>
> : tab_nbr/2/1: 20
>
>                                                   and this can be given by
> join join join join "tab_nbr/" L join "/"  C ": " 20
>                                                    which generates  ==
> "tab_nbr/2/1: 20" then the "do" word will do it like this.
>
> do  join join join join "tab_nbr/" L join "/"  C ": " 20
>
> But now that I can use real variable indexes with my array, am I supposed
> to use loops too just to get
> any cell value initialized with something other than some constant like the
> series of values : 10, 20 , 30 , 40 50 and 60.
>
> Would it not be simpler to have something like this :
>
> tab_nbr: array/initial/series  [3 2]  10  60 10 where the start, stop and
> increment values would be respectively 10 60 and 10.
>
> IS this already possible in another way that I am not aware of ?
>
> While I am at it, I also tried to use the word "reduce" and a to-block
> conversion instead of the word "do" but it seems that the refered object
> (tab_nbr) is not in the same context.
>
> So is there a way to notify REBOL that we want it to share some valuable
> information from a context to another one or do we have to define it for
> the global one, which in this case is not under my control
>
> Thanks to all for any clue if any,
>
> Gerard
>
>
>
>
> ----- Original Message -----
> From: "Gregg Irwin" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, June 26, 2002 1:00 PM
> Subject: [REBOL] Re: making objects from block content
>
> > Hi Again,
> >
> > As an addenduem, it may not work at all in your case as LOAD will very
> > likely not recognize numbers as valid set-words.
> >
> > --Gregg
> >
> >
> > --
> > To unsubscribe from this list, please send an email to
> > [EMAIL PROTECTED] with "unsubscribe" in the
> > subject, without the quotes.

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to