verify/exprseq
verify expression sequences in a mutable structure
Description
Examples
Compatibility
The special verifications %NULL, seq, and &, can be used to verify an expression sequence in a mutable structure, that is, in an Array, Matrix, Vector, table, or record verification.
%NULL verifies empty expression sequences.
seq(ver) verifies expression sequences of ver verifications.
(ver1 &, ver2 &, ver3 ... ) verifies expression sequences using ver1 for the first element, and so on.
When used in a verification for a mutable structure, these verifications expand to a form that matches the entries wrapped in lists.
When used outside a verification for a mutable structure, these verifications return FAIL.
Create two records, each with a c field assigned the NULL value.
r≔Record⁡a=x2−1,b=3,c=NULL:
s≔Record⁡a=x−1⁢x+1,b=3,c=NULL:
Because the c field is NULL, the verification record(expand), which is needed to compare the a fields, returns false.
verify⁡r,s,record⁡expand
false
Use the verification Or(expand,%NULL) to verify the records.
verify⁡r,s,record⁡Or⁡expand,%NULL
true
The seq verifier may also be used for this, because a NULL value matches an empty sequence.
verify⁡r,s,record⁡seq⁡expand
Use the &, operator to verify an expression sequence assigned to a record.
r≔Record⁡a=42,x2−1,1,b=3:
s≔Record⁡a=42,x−1⁢x+1,2,b=3:
verify⁡r,s,record⁡Or⁡truefalse,truefalse&,expand&,less_than
Using any of the special verifications outside a mutable structure verifier returns FAIL.
verify⁡,,%NULL
FAIL
The verify/exprseq command was introduced in Maple 2015.
For more information on Maple 2015 changes, see Updates in Maple 2015.
See Also
Record
verify
verify/expand
verify/record
Download Help Document