Typesets

1. Abstract

Typesets represents sets of datatype values stored in a compact array of bits (up to 96 bits), allowing for high performance runtime type-checking support.

Datatypes in a typeset may share common traits or behaviors, but that is not a requirement. A typeset can be created based on any criteria that suits the users needs.

See: typeset!

2. Available typesets in Red

2.1. all-word!

2.2. any-block!

2.3. any-function!

2.4. any-list!

2.5. any-object!

2.6. any-path!

2.7. any-string!

2.9. any-word!

2.11. external!

2.13. internal!

2.14. number!

2.15. scalar!

2.16. series!

  • make typeset! [block! paren! string! file! url! path! lit-path! set-path! get-path! vector! hash! binary! tag! email! image!]

    A series in Red is defined as a sequence of elements, and a starting position which can be moved along the sequence of elements from the first position (head), to the last position (tail). The starting position of an empty series is at the last position (tail).

    Several references can be set to the same series with different starting positions:

    >> a: "hello"
    == "hello"
    
    >> b: next a
    == "ello"
    
    >> index? a
    == 1
    
    >> index? b
    == 2
    
    >> same? a b
    == false
    
    >> same? a head b
    == true
    
    >> append a " world"
    == "hello world"
    
    >> b
    == "ello world"

    The type of the elements in a series is dependant on the datatype! of the series. For example, a block! series can contain values of any type. A string! series can only contain char! values, etc.

    Series! provides an index variable that can be leveraged by all series action! values.

results matching ""

    No results matching ""