Datatype! datatype

1. Abstract

Datatype! represents all valid types that are pre-defined for Red.

Datatype! is a member of the following typesets: default!, immediate!

2. Creation

Datatype! values are pre-defined for Red and cannot be created.

3. Literal syntax

By convention, literal syntax is a word! value ending with an exclamation mark !.

Examples: bitset!, string!, time!, word!

4. Conversions

A datatype! value can be converted to any value of the typeset any-word!, and to the datatypes issue!, refinement!.

>> to word! string!
== string!

>> to set-word! string!
== string!:

>> to lit-word! string!
== 'string!

>> to get-word! string!
== :string!

>> to issue! string!
== #string!

>> to refinement! string!
== /string!

5. Comparisons

No comparisons are supported for datatype!.

6. Testing values

Use datatype? to check if a value is of the datatype! datatype.

>> datatype? string!
== true

Use type? to return the datatype of a given value.

>> type? string!
== datatype!

7. Predefined words

The word datatype! refers to all predefined datatypes. Predefined datatypes can be viewed by typing help datatype! in the Red console.

7.1. Actions

copy

7.2. Functions

to-get-word, to-issue, to-lit-word, to-refinement, to-set-word, to-word

7.3. Natives

as

results matching ""

    No results matching ""