Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Types in Mathematica thread

  • To: mathgroup at smc.vnet.net
  • Subject: [mg62837] Re: Types in Mathematica thread
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Tue, 6 Dec 2005 00:43:05 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

On 12/5/05 at 3:37 AM, hattons at globalsymmetry.com (Steven T. Hatton)
wrote:

>>4. There are other built in type tests that rely on other tests
>>than Head: NumberQ, NumericQ, IntegerQ, EvenQ, OddQ, PrimeQ;
>>ArrayQ, VectorQ, MatrixQ (for these there are nice element tests,
>>too), PolynomialQ (element tests). There are built in "structural"
>>tests, and I mention these for the reason mentioned next: SameQ,
>>UnsameQ, OrderedQ, MemberQ, FreeQ, MatchQ, ValueQ, AtomQ. With
>>these, argument-testing syntax is f[x_?testQ]. q.v. Section 2.3.5.

>RealQ?  Ironically that one seems to be missing.  Probably an
>intentional ommission. 

Perhaps. But it is easily added should you want a test for reals using the same syntax, e.g.,

RealQ[x_]:=Element[x,Reals]

will do the trick quite nicely.
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: Threading 'Append'
  • Next by Date: Re: How to set up a diff equation for circuit with a diode?
  • Previous by thread: Re: Re: Re: Types in Mathematica thread
  • Next by thread: Re: Types in Mathematica thread