Probably everyone with programming experience will have the same problem your
having when trying to learn REBOL.  In REBOL there is no need for this
activity, thats why its so hard to make it do that. REBOL's series type is
what you need to focus on to solve this problem. It is an amazing thing.
Unlike an array, it can hold anything, even another series. This little
example will demostrate:

stuff: [ [0] [1 2 3] ["a" "b" "c"] [4 5] ]

foreach container stuff [
    foreach thing container [
        print thing
    ]
]

;You can use pick to extract individual values when needed. Example:
print pick stuff 2
print pick pick stuff 2 3

;or a easier to understand version
print container: pick stuff 2
print thing: pick container 3

There is also a facility for doing array's, aptly called array, but I think
series are most important to learn at first, so you dont get trapped into
legacy programming processes.  Plus I find arrays not as much fun to use
either.

--Ryan

[EMAIL PROTECTED] wrote:

> First let me tell you I took a C++ course(1301) years ago and haven't done
> too much programing since.  I'm just installed a small LAN and am trying
> to learn rebol for maitnance and fun....
> Now my problem...I need to make the value of var1:test1 into the name of a
> new variable that can hold a value like test1:4.  Then the programs loops
> and var1:test2 and I want test2:some#.  I can make the value of var1
> increment I just can't figure out how to make test#:some# from var1:test#.
> Thanks for any help, I looked all over the sites documentation but didn't
> see what I needed...if its on there just point me in the direction to look
> if its easier.  Thanks, Bryce
>
> --------------------------------------------------------------------------
>
> Why is College Club the largest and fastest growing college student site?
> Find out for yourself at http://www.collegeclub.com

Reply via email to