[REBOL] Cloned object or ???
From: raimunddold::web::de at: 19-Jul-2001 22:53
Hi,
I am playing with embedded objects and stumbled about a behaviour I just did
not expect. I read through the docs but I could not find anything which
clarified the issue for me. Maybe someone can help me.
Attached is a short example
Thanx,
Raimund
-----------------------------------------------------
REBOL [
File: %test-embedded-object.r
Author: "Raimund Dold"
Email: [raimunddold--web--de]
]
emb-obj: make object! [
val: 0.0
run: 0
]
my-obj: make object! [
name: ""
max: make emb-obj[]
]
obj1: make my-obj [
name: "obj1"
]
obj2: make my-obj [
name: "obj2"
]
obj1/max/val: 2.0
probe obj2
print [equal? obj1 obj2]
print [equal? obj1/max obj2/max]
--------------------------------------
The output is the following:
>> do %test-embedded-object.r
make object! [
name: "obj2"
max:
make object! [
val: 2
run: 0
]
]
false
true