Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*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 2005

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

Search the Archive

Re: Precedence

  • To: mathgroup at smc.vnet.net
  • Subject: [mg60281] Re: Precedence
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Sat, 10 Sep 2005 06:46:33 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <dfrgpu$fr6$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

not in a portable way because the precedence is 
hard coded in
$TopDirectory/SystemFiles/FrontEnd/TextResources/UnicodeCharacters.tr
you will find there lines like
0x00B7  \[CenterDot]  ($.$   $&CenterDot;$ 
$\cdot$   $\centerdot$)  Infix  530  None  3  3
and the number after "Infix" gives you precedence.

Regards
  Jens


"Xerxes" <Xerxes314 at gmail.com> schrieb im 
Newsbeitrag news:dfrgpu$fr6$1 at smc.vnet.net...
| Hi all,
|
| I've been writing a package using Mathematica to 
do lattice
| perturbation theory. As a part of my package, 
I'd like to
| define my own matrix multiplication, which I 
call dotm. Since
| CenterDot looks pretty and has no previous 
assignment, I've
| used it as both the input and output format of 
dotm. However,
| I run into problems when I try to type things 
like
|
| Y[x].g A[x].Y[x+a]
|
| where the . should be imagined to be CenterDot. 
Because the
| precedence of the . is higher than the 
precedence of the
| multiplication, this gives (Y.g)(A.Y) instead of 
Y.(gA).Y.
|
| I know I can attach a TagBox to the CenterDot to 
force it to
| have lower precedence, but that ruins the 
convenience of typing
| esc-.-esc to get the dot. Is there some other 
way to teach
| Mathematica to use a lower precedence?
|
| Xerxes
| 



  • Prev by Date: Re: Numerical integration over half-infinite intervals
  • Next by Date: Re: Precedence
  • Previous by thread: Precedence
  • Next by thread: Re: Precedence