| Did you know ... | Search Documentation: |
| Predicate object/2 |
object(+Reference)
<pce>(Address,Class),
as produced by new/2
and get/3
for an object that has no name. It can be passed to send/2
and get/3,
compared with ==/2 and used as a key, but it is not a term to take
apart. Use object_reference/2
for the XPCE-level reference and is_object_reference/1
to test a term.@Atom, where Atom is the
name of a global object such as @display. See pce_global/2.In all other cases this predicate fails silently. It also fails for a reference whose object has been freed, and it cannot be misled: as long as Prolog holds the handle the object's administration is kept, so the handle cannot come to denote whatever was created in its place.
@Integer is not a reference. XPCE
identifies an anonymous object internally by its address, which
object<-object_reference still reports, but that number
is not accepted as a reference: after the object is freed and its memory
reused it would denote a different object. There is no way to turn one
back into an object, and therefore no way to hold a reference that lies.
object/2 converts an object into a descriptive term. See the User Guide for complete information.
See also @pce<-object_from_reference and
object->name_reference.