Abstract types​

These types are used in definitions of polymorphic (generic) functions that can be applied to a broad range of types.

type

anytype

Abstract types - 图1

Generic type.

It is a placeholder used in cases where no specific type requirements are needed, such as defining polymorphic parameters in functions and operators.

type

anyscalar

Abstract types - 图2

Abstract base scalar type.

All scalar types are derived from this type.

type

anyenum

Abstract types - 图3

Abstract base enumerated type.

All enum types are derived from this type.

type

anytuple

Abstract types - 图4

Generic tuple.

Similarly to anytype it denotes a generic tuple without going into details of what the components are. Just as with anytype, this is useful when defining polymorphic parameters in functions and operators.

Abstract Numeric Types​

There are a number of abstract numeric types extending anyscalar:

type

anyint

Abstract types - 图5

Abstract base scalar type for int16, int32, and int64.

type

anyfloat

Abstract types - 图6

Abstract base scalar type for float32 and float64.

type

anyreal

Abstract types - 图7

Abstract base scalar type for anyint, anyfloat, and decimal.