Strings and blocks are always references in Rebol. If you want different =
block for each of them, you should use copy command.
It is same for strings also.


> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf
> Of Carlos Lorenz
> Sent: Monday, April 27, 2009 10:12 PM
> To: [email protected]
> Subject: [REBOL] setting values to blocks - need help
>=20
> Hi list,
>=20
> Need some help to understand this:
>=20
> >> blk: copy []
> =3D=3D []
>=20
> >> for i 1 3 1 [ append/only blk [] ]
> =3D=3D [ [] [] [] ]
>=20
> >> append blk/1 "1"
> =3D=3D ["1"]
>=20
> >> probe blk/1
> ["1"]
> =3D=3D ["1"]
>=20
> >> probe blk
> [["1"] ["1"] ["1"]]
> =3D=3D [["1"] ["1"] ["1"]]
>=20
> How come blk/2 and blk/3 were set to same value of blk/1 ???
>=20
> Thanks
>=20
>=20
> --
> Carlos Lorenz
> Unidade Lorenz Ltda
> www.revistaeletronica.com.br
> (11) 4034 1971
> (11) 7100 1540 pessoal
>=20
>=20
> --
> To unsubscribe from the list, just send an email to
> lists at rebol.com with unsubscribe as the subject.

-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to