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

Abstract Types - 图2

Abstract Types - 图3

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 - 图4

Abstract Types - 图5

Abstract Types - 图6

Abstract base scalar type.

All scalar types are derived from this type.

type

anyenum

Abstract Types - 图7

Abstract Types - 图8

Abstract Types - 图9

Abstract base enumerated type.

All enum types are derived from this type.

type

anytuple

Abstract Types - 图10

Abstract Types - 图11

Abstract Types - 图12

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 - 图13

Abstract Types - 图14

Abstract Types - 图15

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

type

anyfloat

Abstract Types - 图16

Abstract Types - 图17

Abstract Types - 图18

Abstract base scalar type for float32 and float64.

type

anyreal

Abstract Types - 图19

Abstract Types - 图20

Abstract Types - 图21

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

Abstract Range Types

There are some types that can be used to construct ranges. These scalar types are distinguished by the following abstract types:

type

anypoint

Abstract Types - 图22

Abstract Types - 图23

Abstract Types - 图24

Abstract base type for all valid ranges.

Abstract base scalar type for int32, int64, float32, float64, decimal, datetime, cal::local_datetime, and cal::local_date.

type

anydiscrete

Abstract Types - 图25

Abstract Types - 图26

Abstract Types - 图27

Abstract base type for all valid discrete ranges.

Abstract base scalar type for int32, int64, and cal::local_date.

type

anycontiguous

Abstract Types - 图28

Abstract Types - 图29

Abstract Types - 图30

Abstract base type for all valid contiguous ranges.

Abstract base scalar type for float32, float64, decimal, datetime, and cal::local_datetime.