MathGroup Archive 2005

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

Search the Archive

Re: 'Raw Expressions'

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61678] Re: 'Raw Expressions'
  • From: "Matt" <anonmous69 at netscape.net>
  • Date: Wed, 26 Oct 2005 01:01:33 -0400 (EDT)
  • References: <djht17$sjt$1@smc.vnet.net><djk1p1$gto$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Thanks guys.  I'm too used to thinking of declaring variables and
strong types.  If I had an input that was constrained to have a head of
Integer (e.g. x_Integer), then Set[y, N[x]] would create a variable y
with a head of Real.

e.g.

f[x_Integer] := Module[{y = N[x]}, Print[Head[x]];Head[y]]
f[2]

I don't yet see the forest for the trees.

Matt


  • Prev by Date: Mathematica and version control systems
  • Next by Date: Re: Timing for a cell
  • Previous by thread: Re: 'Raw Expressions'
  • Next by thread: Zero-based indexing option?