MathGroup Archive 1999

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

Search the Archive

BracketingBar for output


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|

but

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

Is this possible?

TIA

es gruesst
      Peter
-- 
=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=
  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