Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*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 2006

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

Search the Archive

Re: Overriding Mathematica function Print

  • To: mathgroup at smc.vnet.net
  • Subject: [mg64323] Re: Overriding Mathematica function Print
  • From: Sascha Kratky <spam at this.com>
  • Date: Sat, 11 Feb 2006 03:32:52 -0500 (EST)
  • References: <dscca1$p7a$1@smc.vnet.net> <dset8h$j9s$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Thanks,

is it possible to call the original (system) definition of Print from
the overridden version of Print (kind alike "inherited" or "super" in
object-oriented languages)?

Regards,
Sascha

In article <dset8h$j9s$1 at smc.vnet.net>, Jens-Peer Kuska
<kuska at informatik.uni-leipzig.de> wrote:

> 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: Re: Plotting a set of complex points
  • Next by Date: Re: Using sockets for "downloader" application in Mathematica
  • Previous by thread: Re: Overriding Mathematica function Print
  • Next by thread: Re: Overriding Mathematica function Print