Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: IsIntegerOrFloat

  • To: mathgroup at smc.vnet.net
  • Subject: [mg87041] Re: IsIntegerOrFloat
  • From: "Szabolcs HorvÃt" <szhorvat at gmail.com>
  • Date: Sun, 30 Mar 2008 01:14:55 -0500 (EST)
  • References: <47EE1B98.7060002@gmail.com> <C4139E65.1953A%carlosf@cimne.upc.edu>

On Sat, Mar 29, 2008 at 3:21 PM, Carlos Felippa <carlosf at cimne.upc.edu> wrote:
>
>  >
>  > iiof[expr_] := VectorQ[expr, Head[#] === Integer || Head[#] === Real &]
>  >
>    This list should test as True:
>
>    IIOF[expr_]:=VectorQ[expr,Head[#]===Integer||Head[#]===Real&];
>    nodxyz={{1}, {5}, {2, 0.33333, 4.}, {156.9925, 2.23606}};
>    Print["IIOF[nodxyz]=",IIOF[nodxyz]];
>
>    False

Well, you explicitly said "flat list" in the original request, didn't you?

If it's not flat, flatten it before passing it to the function.  (See
the docs for Flatten)


  • Prev by Date: Re: Number of monominals
  • Next by Date: Re: Number of monomials
  • Previous by thread: Re: IsIntegerOrFloat
  • Next by thread: Re: IsIntegerOrFloat