exprseq - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


verify/exprseq

verify expression sequences in a mutable structure

 

Description

Examples

Compatibility

Description

• 

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.

Examples

Create two records, each with a c field assigned the NULL value.

rRecorda=x21,b=3,c=NULL:

sRecorda=x1x+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.

verifyr,s,recordexpand

false

(1)

Use the verification Or(expand,%NULL) to verify the records.

verifyr,s,recordOrexpand,%NULL

true

(2)

The seq verifier may also be used for this, because a NULL value matches an empty sequence.

verifyr,s,recordseqexpand

true

(3)

Use the &, operator to verify an expression sequence assigned to a record.

rRecorda=42,x21,1,b=3:

sRecorda=42,x1x+1,2,b=3:

verifyr,s,recordOrtruefalse,truefalse&,expand&,less_than

true

(4)

Using any of the special verifications outside a mutable structure verifier returns FAIL.

verify,,%NULL

FAIL

(5)

Compatibility

• 

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