The Scalar Types

Besides the types used for container management, that are described separately in Section [*], the following external and enumeration types are declared in the schema knl:

extern void (0);

extern sos_Int (4);
extern sos_Bool (1);
extern sos_Char (1);
extern sos_Cstring (4);
extern sos_Pointer (4);

enum   sos_Bool {FALSE, TRUE};
enum   sos_Eq_kind {EQ_STRONG, EQ_WEAK};
enum   sos_Comp_result {CMP_LESS, CMP_EQUAL, CMP_GREATER};
The external type void is a type with no value, it is used to indicate functions returning nothing.

The type sos_Int represents integer numbers. The numbers supported by the kernel are restricted to a length of four bytes (whereby a two's-complement form is used).

The type sos_Char represents one-byte ASCII characters; the type sos_Cstring is intended to hold a pointer to a successive number of sos_Char objects, whose end is indicated by the ASCII control character NUL, whereas the type sos_Pointer is intended to hold arbitrary pointers to main memory.[*]

The enumeration type sos_Bool represents the boolean truth values. The enumeration type sos_Eq_kind is presumably mostly used as argument type in calls of the predefined method equal (see Section [*]). The remaining enumeration type sos_Comp_result can be used as the return value of comparison operations (see e.g. sos_Ordered_object).

Objects of the predefined scalar types and all enumeration types are stored in the SOS system in an exactly defined, machine and language independent way.[*]They can be used by applications written in different languages and running on different machines.

Scalar types are no class types, therefore no instances of a scalar type can be created and no application specific function methods can be defined for them. Objects of scalar types lie on the boundary between SOS and a host programming language. This is examplified by the fact that there are two representations of these objects:

Means for converting between both scalar object representations are defined by the respective language binding. The conversion operations provided by the C++ language binding are described in Section [*] and Section [*].