Tag! datatype

1. Abstract

Tag! values represent markup language tags and elements.

Tag! is a member of the following typesets: any-string!, series!

2. Creation

Tag! values can be created using literal syntax, or at runtime by using a make constructor or to conversion.

>> make tag! "foo"
== <foo>
>> to tag! 'bar
== <bar>

3. Literal syntax

One or more characters enclosed by a open angle bracket < and closing angle bracket >.

The first character after the opening angle bracket cannot be <, >, or =.

Literal whitespace is not allowed between the opening angle bracket and the first character, as the lexer will interpret it as an invalid comparison operator.

>> < foo>
*** Script Error: < operator is missing an argument
*** Where: catch
*** Stack:

4. Comparisons

All comparators can be applied on tag!: =, ==, <>, >, <, >=, <=, =?. In addition, min, and max are also supported.

5. Testing values

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

>> tag? <foo>
== true

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

>> type? <foo>
== tag!

6. Pre-defined words

6.1. Functions

tag?, to-tag

results matching ""

    No results matching ""