Closed typeswitch-dev closed 6 months ago
This PR adds a way to specify a tag value for data types. This closes #233.
data
To use it, place an integer value before the tag name, e.g.:
data(MyData, 10 Foo, 20 Bar, 30 Baz)
This causes the .tag value for Foo to be 10, Bar to be 20, and Baz to be 30.
.tag
Foo
Bar
Baz
If you omit a number, it will use the number than the previous tag's number. So for example, the following are equivalent:
data(MyData, 10 Foo, 11 Bar, 12 Baz) data(MyData, 10 Foo, Bar, Baz)
If two tag values are the same, the compiler raises an error. (Use an alias instead.)
This PR adds a way to specify a tag value for
data
types. This closes #233.To use it, place an integer value before the tag name, e.g.:
This causes the
.tag
value forFoo
to be 10,Bar
to be 20, andBaz
to be 30.If you omit a number, it will use the number than the previous tag's number. So for example, the following are equivalent:
If two tag values are the same, the compiler raises an error. (Use an alias instead.)