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 > | > >