MathGroup Archive 2010

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

Search the Archive

Re: syntax extension

  • To: mathgroup at smc.vnet.net
  • Subject: [mg106486] Re: syntax extension
  • From: Chris Osborn <chrisosb at gmail.com>
  • Date: Thu, 14 Jan 2010 05:48:47 -0500 (EST)
  • References: <hihgmc$ffp$1@smc.vnet.net>

On Jan 12, 3:51 am, Richard Fateman <fate... at cs.berkeley.edu> wrote:
> Is there a neat way to create a new symbol,
> say /!.    so that
>
> expression /. BetterRules[rules]
>
> could be written as
>
> expression /!. rules
>
> I do not find writing something like
>
>   (expression) ~BR~ (rules)
>
> to be quite adequate, especially with the extra parentheses.
> RJF

Hi Richard,

Yes, use the "Notation Package" (you can search for this in the docs).
The actual function you will want to use is probably "InfixNotation".

It's a bit weird though since you have to paste a skeleton of your
call to InfixNotation
from a palette, and then fill in the box asking for your operator.

I haven't done this in a while, but it's all described in the docs.

Chris


  • Prev by Date: Re: Plotting a curve on a flat torus
  • Next by Date: Re: disable canceling
  • Previous by thread: Re: syntax extension, precedence, Notation`
  • Next by thread: Re: Positions of earliest dates for each month in a list