MathGroup Archive 2010

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

Search the Archive

Precedence Problems

  • To: mathgroup at smc.vnet.net
  • Subject: [mg106492] Precedence Problems
  • From: "David Park" <djmpark at comcast.net>
  • Date: Thu, 14 Jan 2010 05:50:02 -0500 (EST)

I wonder what the MathGroup experts think of the handling of precedence in
Mathematica? 

I sometimes use MakeBoxes and InterpretationBox to format various functions.
The problem is to control the use of parentheses when combined with
surrounding expressions. InterpretationBox has an option, SyntaxForm, but
this is not fully integrated into Mathematica. This does not allow one to
specify a distinctive precedence level such as is assigned to built-in
functions. Worst, the use of SyntaxForm gives FrontEnd crashes in difficult
to reproduce manners. (Sometimes it occurs with the Delete Output menu item,
but not always, and sometimes in other cases.)

I wonder if other people have experience with SyntaxForm or a better way to
handle this?

I think it would be very useful if precedence and the use of parentheses
could be specified for user defined functions just as it is well defined for
built-in functions. It might also be very useful if operators that did not
have built-in meanings could be assigned a precedence by the user.

David Park

djmpark at comcast.net

 <http://home.comcast.net/~djmpark> http://home.comcast.net/~djmpark/  

 


  • Prev by Date: Re: Rotated text labels
  • Next by Date: Re: Re: More /.{I->-1} craziness
  • Previous by thread: Re: Differential Eq.
  • Next by thread: New version of Quantum Mathematica Add-On for Dirac bra ket notation quantum algebra and quantum computing