Re: Programming
- To: mathgroup at smc.vnet.net
- Subject: [mg2849] Re: [mg2819] Programming
- From: wagner at bullwinkle.cs.Colorado.EDU (Dave Wagner)
- Date: Wed, 27 Dec 1995 00:47:53 -0500
- Organization: University of Colorado, Boulder
In article <4bg391$ob8 at dragonfly.wri.com>, Richard Mercer <richard at seuss.math.wright.edu> wrote: >Jack, > >The first step is to create a command that checks for error messages >and undesirable outcomes. I'll call it IntegrateG. > >IntegrateG[items__]:= > Module[{res}, (stuff deleted) > ]; > >This will work fine. But suppose you want it to automatically replace >Integrate? Here's how: > >$Pre = (# /. Integrate->IntegrateG)&; Ah, this is a great idea. I believe this will solve the problem of nested calls, won't it? Robby? By the way, Jason Harris wrote a package that makes it easy to introduce substitutions that use $Pre. It's called aliases.m and I think it's available from MathSource. Dave Wagner Principia Consulting (303) 786-8371 dbwagner at princon.com http://www.princon.com/princon