MathGroup Archive 1999

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

Search the Archive

BracketingBar for output

  • To: mathgroup at
  • Subject: [mg15717] BracketingBar for output
  • From: phbrf at (Peter Breitfeld)
  • Date: Fri, 5 Feb 1999 03:42:15 -0500 (EST)
  • Organization: das ist ein breites Feld ...
  • Sender: owner-wri-mathgroup at

In my "personal package" I have the function Betrag[x_]:=Sqrt[x.x]

Now I want that in cases where this function can't be evaluated, the
output in StandardForm is displayes as |x|. (left and right
BracketingBar, these symbols you get when entering `ESC l| ESC' and
`ESC r| ESC'. 

To make it more clear (I hope :-)) I want the following behavior

In[1]  Betrag[foo]
Out[1] |foo|


In[1]  Betrag[{2,2,1}]
Out[1] 3

Is this possible?


es gruesst
  Peter Breitfeld, Saulgau, Germany       (PGP public key: 08548045)

  • Prev by Date: Re: Nested For Loops
  • Next by Date: spherical diffusion
  • Previous by thread: Re: Points on MultipleListPlots
  • Next by thread: Re: BracketingBar for output