[REBOL] Re: I just ain't gettin' it! :)
From: rebol-list2:seznam:cz at: 20-Dec-2002 12:45
Hello Ed,
Wednesday, December 18, 2002, 10:42:10 PM, you wrote:
ED> OK,
ED> This is something in REBOL I just haven't figured out yet.
ED> How do update a value in the middle of a series?
ED> If I have an array of x: [ 1 2 3 4 ], how do I update it to be x: [ 1 2
ED> 5 4 ]. I do not want to change any other value and I want to do it based
ED> on Index.
ED> I can do this: x/3: 5. But I want to do this dynamically and can't
ED> figure out how to use "Change" (if that is the right function) to do it
ED> within a program.
This is one of the things in Rebol that could be better... I like
the way how it's in other languages:
x = new Array(1,2,3,4)
x[2] = 5
as this is quite powerful (and more readable) in the more dimensional arrays:
x[2][1] = 5
y[0]["fruit"] = "lemons";
=( Oliva David )=======================( [oliva--david--seznam--cz] )==
=( Earth/Europe/Czech_Republic/Brno )=============================
=( coords: [lat: 49.22 long: 16.67] )=============================