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: 'Raw Expressions'

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61654] Re: 'Raw Expressions'
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Mon, 24 Oct 2005 21:07:12 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <djht17$sjt$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

what man N[] do ??

Regards
  Jens

"Matt" <anonmous69 at netscape.net> schrieb im 
Newsbeitrag news:djht17$sjt$1 at smc.vnet.net...
| Hello,
|     Given this as input:
|
| someArray = Array[r, {2, 2}, {2, 4}];
| Level[someArray, {-1}]
|
| which results in the following output:
|
| {2, 4, 2, 5, 3, 4, 3, 5}
|
| and the fact that a level specification of -1 is 
defined thusly:
| "Level -1 contains all symbols and other objects 
that have no
| subparts",
|
| one would naively expect that this:
|
| Apply[HeadNew, someArray, {-1}]
|
| would change all the integers in someArray to 
have new heads of
| NewHead.  However, on page 711 of Michael 
Trott's Programming
| Guidebook, he states "The head of raw 
expressions does not get changed
| by Apply."  I assume that by 'raw expression' he 
means fundamental
| types such as Integers, Reals, Strings, etc. 
This makes sense to me,
| because it would be nonsensical to change the 
head of an integer to be
| String or vice versa.  However, a question did 
occur to me in the
| hypothetical.  Let's say that a function had 
been defined that had a
| constraint upon a certain input, in that the 
input needed to be of
| Integer type, but for some reason, I wanted to 
deal with the input
| internally as a type of Real.  How would I do 
that?
|
| Thanks,
|
| Matt
| 



  • Prev by Date: Re: Warning from Piecewise
  • Next by Date: Re: Use of CAS in introductory science&engineering courses
  • Previous by thread: Re: 'Raw Expressions'
  • Next by thread: Re: 'Raw Expressions'