Table of Contents
Datový typ datatype!
representuje všechny platné předdefinované typy Redu.
Datatype!
je člen typesetů immediate!
a default!
.
Dle konvence je součástí názvu datového typu vykřičník, například: bitset!
, string!
, time!
, word!
Hodnotu typu datatype!
lze konvertovat na jakýkoli typ typesetu any-word!
a na datové typy issue!
a 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!
K ověření, zda hodnota je typu datatype!
, lze použít funkci datatype?
.
>> datatype? string!
== true
Funkce type?
vrací datový typ zadané hodnoty.
>> type? string!
== datatype!