MathGroup Archive 2008

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

Search the Archive

Problem with HoldForm & Unevaluated

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94468] Problem with HoldForm & Unevaluated
  • From: Syd Geraghty <sydgeraghty at me.com>
  • Date: Sun, 14 Dec 2008 07:37:48 -0500 (EST)

Hi all,

A seemingly simple function has me baffled and I would appreciate a  
solution.

I am trying to define a personal print function that prints  
"Unevaluated function string" = Evaluated function!

I have tried many examples in guide/EvaluationControl documentation  
without getting what I want.

A simple example;

printf[fn_] := Print[HoldForm[fn], " = ", fn];

printf[Rationalize /@ {-1.7, 1.39646, -0.37188}]

Print[HoldForm[Rationalize /@ {-1.7, 1.39646, -0.37188}], " = ",
  Rationalize /@ {-1.7, 1.39646, -0.37188}]

gives the LHS evaluated:

{-(17/10),69823/50000,-(9297/25000)} = {-(17/10),69823/50000,- 
(9297/25000)}

Instead of the hoped for output:

Rationalize/@{-1.7,1.39646,-0.37188} = {-(17/10),69823/50000,- 
(9297/25000)}

Using Unevaluated seemed to me should fix it but does not.

Thanks in advance for your help.

Cheers ... Syd

PS I've tried Mathematica 5.2 as well as 7.0



Syd Geraghty B.Sc, M.Sc.

sydgeraghty at mac.com

Mathematica 7.0.0 for Mac OS X x86 (64 - bit) (21st November, 2008)
MacOS X V 10.5.4
MacBook Pro 2.33 Ghz Intel Core 2 Duo  2GB RAM











  • Prev by Date: Re: Aligning two PLots
  • Next by Date: Re: Aligning two PLots
  • Previous by thread: Mathematica 7 Palettes Stays in front of notebook window, blocking the view. How to fix?
  • Next by thread: Re: Problem with HoldForm & Unevaluated