MathGroup Archive 1999

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

Search the Archive

Re: Is it a bug?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg17685] Re: Is it a bug?
  • From: Harald Giese <giese at dkrz.de>
  • Date: Fri, 21 May 1999 23:59:02 -0400
  • Organization: Institut fuer Meereskunde, Universitaet Hamburg
  • References: <7hgdfs$4bu@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

"F. Mittermayr" wrote:
> 
> A = {1 + Sqrt[2] I , 1 + 2 * 3 I};
> Cases[A, _Complex]
> 
> Out[1] = {1+6 I}
> 
> Isn't it a strange result?


No, because "Cases" lookes only at the first level by default;
"Cases[A, _Complex, Infinity]" would return what you expected.
To see the structure of "A" type: "FullForm[A]".

Regards,
Harald

-- 
Harald Giese
Email: giese at dkrz.de
> NEUE TELEFON-NUMMER | NEW PHONE-NUMBER <
Phone: +49 (0)40 42838 5796; Fax: +49 (0)40 5605724
Institut fuer Meereskunde der Universitaet Hamburg
(Institute of Oceanography of the University of Hamburg)
Troplowitzstrasse 7, D-22529 Hamburg


  • Prev by Date: Re: Insertion Point Bug
  • Next by Date: Re: ParametricPlot3D
  • Previous by thread: Re: Is it a bug?
  • Next by thread: Re: Re: Is it a bug?