1.33 class constant

Instances of class constant represent unique values. This uniqueness is represented and guaranteed by the object-reference.

Class constant defines the instance variables constant<-name and constant<-summary for documentation purposes.

The system defines the following constants:

@nil Nothing, not-filled
@default Use default value

The user may create constants for a specific application. Constants may not be deleted as they are automatically protected using object->protect. See also class bool.

See also
class bool

1.33.1 Instance variables

constant <-> name: name
Name of the constant. Note that object<-print_name (used by class text_item) returns constant<-name by default.
constant <-> summary: string*
Short description for documentation purposes. Similar to‘class constant<-summary’, etc.

1.33.2 Send methods

constant ->initialise: name=name, summary=string
Create a constant from its name and summary. The corresponding slots are filled and the created instance is object->protect’ed against the garbage collector. It is very uncommon for application programmers to define new constants.