Core Types (pdk.core)
Contains core data structure definitions
Last updated
Contains core data structure definitions
Last updated
A root type from which all other data types and structures are derived.
Superstructures: none
A superstructure for all non-primitive structures (i.e. those not used to describe simple data types).
Superstructures:
A base structure from which all user-defined data structures are derived.
Superstructures: <-
A superstructure for all numeric data types.
Superstructures:
Represents whole numbers and to store numeric values without fractional or decimal parts. These values can be both positive and negative.
Represents real numbers - numbers that can contain a fractional component (have a decimal point) . It is used to store both positive and negative real numbers with arbitrary precision.
Represents a sequence of characters, typically intended to store and manipulate text. A string can contain any letters, numbers, symbols, and whitespace characters.
Represents a simple binary/logical value that can be either true or false.
Represents a specific moment in date and time with millisecond precision.
The Date
structure is intended to reflect coordinated universal time (UTC). Nearly all modern operating systems assume that 1 day = 24 × 60 × 60 = 86400 seconds in all cases. In UTC, however, about once every year or two there is an extra second, called a "leap second".
In all platform functions using Date
type that accept or return year, month, date, hours, minutes, and seconds values, the following representations are used:
A year y is represented by the integer y - 1900
.
A month is represented by an integer from 0
to 11
; 0
is January, 1
is February, and so forth; thus 11
is December.
A date (day of month) is represented by an integer from 1
to 31
in the usual manner.
An hour is represented by an integer from 0
to 23
. Thus, the hour from midnight to 1
a.m. is hour 0
, and the hour from noon to 1
p.m. is hour 12
.
A minute is represented by an integer from 0
to 59
in the usual manner.
A second is represented by an integer from 0
to 61
; the values 60
and 61
occur only for leap seconds. Because of the manner in which leap seconds are currently introduced, it is extremely unlikely that two leap seconds will occur in the same minute, but this specification follows the date and time conventions for ISO C.
In all cases, arguments given to methods for these purposes need not fall within the indicated ranges; for example, a date may be specified as January 32
and is interpreted as meaning February 1.
A data structure that stores a collection of items, such as a sequence of elements, of the same type. Each element in an array can be accessed by its index, which starts with 0 (i.e. the first element in an array is referenced by an index of 0).
Example:
Example of parameterization:
In the above example, allAnimals array can hold both Tiger and Capybara elements, while tigers can hold only Tiger.
A structure that maps string keys to values so that each value can be looked up by its unique key. A map cannot contain duplicate keys: each key can map to at most one value.
Here is an example in a pseudo-language to demonstrate its use:
Properties:
value :: <Type>
parameterized element type
Superstructures: <-
Superstructures: <-
Superstructures: <-
Superstructures:
Superstructures:
Represents an 8-bit signed integer. It has a minimum value of -128 and a maximum value of 127 (inclusive). The byte
structure can be useful sometimes to save memory occupied by very large .
Superstructures:
Array is a type. It means that the type of the array's elements must be explicitly chosen in a property with Array type is defined.
Superstructures: <-
Keys in the map can only be of type
Map is a type.
Superstructures: <-
A single entry (key-value pair) in the data structure.
MapEntry is a type.
key ::