Patterns
The following code examples demonstrate how a pattern can be declared and used. See section [TBD] for details.
Declaration
Pattern Type: [matched value: int [-1]; s: string ["None"]; last value: bool;].Use
`Define a pattern that will match a sequentially equivalent, value-equivalent
construct, assigning values to "matched value", "s", and "last value".`
pattern a: Pattern Type [matched value, = "Matches A", ..., s, last value];`Define a pattern that will match a sequentially equivalent, value-equivalent
construct, assigning values to "matched value" and "last value".`
pattern b: Pattern Type [matched value, = "Matches B", ..., last value];`Define a pattern that will match a sequentially equivalent, value-conforming
construct.`
pattern c: [] [ > 10, = "Matches C", ...];`Define a pattern that will match a sequentially equivalent value-conforming
construct.`
pattern d: [] [ > 10 and < 100, ...];With Mappings
With Operations
Last updated