variable(+Name,
+Type, +Access)
variable(+Name,
+Type, +Access, +Doc) Declare an instance variable. Normally
placed immediately after the
pce_begin_class/[2,3]
call to declare the additional slots (attributes) of the class. The
arguments are:
- Name -- Name of the instance variable. Must be unique for
this class (it cannot already be used in the super-class).
- Type -- Type specification of permitted values. See Types.
- Access -- Access for the
send and get
operations. Valid values are:
none -- no access (only via
Object<->slot).
get -- may be fetched with get/3;
can be set only via Object->slot.
send -- may be set with send/3;
can be fetched only via Object<-slot (rarely useful).
both -- may be set with send/3
and fetched with get/3.
- Doc -- optional summary documentation of the variable,
visible in the manual tool.
See also class->instance_variable.