ecl-logo Documentation

QuantityArrayP

QuantityArrayP[]qaPatt

returns a pattern that will match any valid QuantityArray.

QuantityArrayP[unitSpec]qaPatt

returns a pattern that will match a valid QuantityArray whose units match unitSpec.

Details

    Input
    Output

Examples

Basic Examples  (4)

Matches any QuantityArray:

Matches QuantityArray whose units are compatible with Inch:

Pattern argument can be _Quantity or String:

Does not match because units are incompatible:

Additional Examples  (3)

Matches 2D QuantityArray:

Pattern for 2D QuantityArray of {Time,Distance}:

Does not match because units are incompatible 2D array: