Singular and Aggregate types

Jan. 7, 2024 || Item:1.8.Singular and Aggregate types

Data types are categorized as either singular or aggregate. A singular type shall be any data type except an unpacked structure, union, or array. An aggregate type shall be any unpacked structure, union, or array data type. A singular variable or expression represents a single value, symbols, or handle. Aggregate expressions and variables represent a set or collection of singular values. Integral types are always singular even though they can be sliced into multiple singular values.

These categories are defined so that operators and functions can simply refer to these data types as a collective group. For example, some functions recursively descend into an aggregate variable until reaching a singular value, and then perform an operation on each singular value.

Note that although a class is a type, there are no variables or expressions of class type directly, only class object handles which are singular. So classes need not be categorized in this manner.



Comments:

Leave a comment: