Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > Rules & Patterns > Patterns > PatternTest (?) >

PatternTest


is a pattern object that stands for any expression which matches p, and on which the application of test gives True.
  • Any result for other than True is taken to signify failure.
  • The operator has a high precedence. Thus is , not .
  • In a form such as __?test every element in the sequence matched by must yield True when test is applied.
Find cases of any expression which satisfies the NumberQ test:
Find cases of any expression which satisfies the NumberQ test:
In[1]:=
Click for copyable input
Out[1]=
New in 1
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF