MathGroup Archive 2006

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

Search the Archive

Re: Overriding Mathematica function Print

  • To: mathgroup at smc.vnet.net
  • Subject: [mg64270] Re: Overriding Mathematica function Print
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 8 Feb 2006 06:29:54 -0500 (EST)
  • Organization: Uni Leipzig
  • References: <dscca1$p7a$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

Clear[Print]

will only remove *your* definitions and not the 
system definitions.
Unprotect[Print]
Print[arg__] := Null

Print[1, 3, 4, 5]

Clear[Print]

Print[1, 3, 4, 5]

Regards

  Jens

"Sascha Kratky" <notvalid at notvalid.com> schrieb im 
Newsbeitrag news:dscca1$p7a$1 at smc.vnet.net...
| Hi,
|
| I need to override the built-in function Print, 
because I have to
| capture the output generated by Print. I am 
sending the following
| definitions to the Mathematica kernel:
|
|      Unprotect[ Print ];
|      Print[ args___ ] := ...
|
| Once I have overridden Print, how can I later 
restore the original
| built-in function?
|
| Thanks,
| Sascha
| 



  • Prev by Date: Poisson equation
  • Next by Date: Re: Problems with With/Block/Module functions
  • Previous by thread: Re: Poisson equation
  • Next by thread: Re: Overriding Mathematica function Print