Null object: Difference between revisions
→For Groups
(Added Wren) |
|||
Line 1,151:
A pointer to a copy of group (as float group) is actually a pointer to group.
Pointers to groups can be point to an
<lang M2000 Interpreter>
class something {
}
class alfa as something {
x=10, y=20
}
a->alfa()
Print a is type alfa = true
Print a is type something = true
a->0&
Print a is type null = true
\\ beta is a named object, is static
group beta {
type: something, alfa
x=10, y=20
}
Print beta is type alfa = true
Print beta is type something = true
\\ now a is a pointer as a weak reference to beta
a->beta
print a is type alfa = true
print a is type something = true
a=pointer() ' same as a->0&
Print a is type null = true
\\ now a is a pointer of a copy of beta
a->(beta)
print a is type alfa = true
print a is type something = true
a=pointer() ' same as a->0&
Print a is type null = true
</lang>
|