GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Date
  • Thread

This view

  • Original page
  • New address

GeezerVison is showing lists.gnu.org — Re: status on $[arith] for eval arith vsl $((arith))??

bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: status on $[arith] for eval arith vsl $((arith))??


From: Chet Ramey
Subject: Re: status on $[arith] for eval arith vsl $((arith))??
Date: Sat, 07 Apr 2012 19:47:13 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

On 4/7/12 4:45 PM, Linda Walsh wrote:
> 
> 
> 
> In modifying some released code on my distro,    I ran into the extensive use
> of   $[arith]  as a means for returning arithmetic evaluations of the
> expression.
> 
> I vaguely remember something like that from years ago, but never see any
> reference to
> it -- yet it works, and old code seems to rely on it -- and
> "$[(1+2)/3]"  looks cleaner than "$(((1+2)/3))".  So what's up with that?

It dates from Posix circa 1990 (1003.2d9, of which I've lost my paper
copy).  I implemented it after the Berkeley guys, mostly Marc
Teitelbaum, put it into Posix.  It ended up getting dropped in favor
of the ksh $((...)) expansion, at which point everyone deprecated the
old $[...].  I removed it from the manual sometime later, but it still
works as it always has.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    [email protected]    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]
  • status on $[arith] for eval arith vsl $((arith))??, Linda Walsh, 2012/04/07
    • Re: status on $[arith] for eval arith vsl $((arith))??, Mike Frysinger, 2012/04/07
      • Re: status on $[arith] for eval arith vsl $((arith))??, Linda Walsh, 2012/04/07
        • Re: status on $[arith] for eval arith vsl $((arith))??, Pierre Gaston, 2012/04/07
    • Re: status on $[arith] for eval arith vsl $((arith))??, Chet Ramey <=
      • Re: status on $[arith] for eval arith vsl $((arith))??, Maarten Billemont, 2012/04/08
        • Re: status on $[arith] for eval arith vsl $((arith))??, Chet Ramey, 2012/04/08
        • Re: status on $[arith] for eval arith vsl $((arith))??, dethrophes, 2012/04/08
        • Re: status on $[arith] for eval arith vsl $((arith))??, Maarten Billemont, 2012/04/09
        • Re: status on $[arith] for eval arith vsl $((arith))??, Linda Walsh, 2012/04/09
        • Re: status on $[arith] for eval arith vsl $((arith))??, Maarten Billemont, 2012/04/10
        • Re: status on $[arith] for eval arith vsl $((arith))??, Chet Ramey, 2012/04/10
        • Message not available
        • Re: status on $[arith] for eval arith vsl $((arith))??, Aharon Robbins, 2012/04/09
        • Re: status on $[arith] for eval arith vsl $((arith))??, Linda Walsh, 2012/04/09
        • Re: status on $[arith] for eval arith vsl $((arith))??, Chet Ramey, 2012/04/09

  • Prev by Date: Re: status on $[arith] for eval arith vsl $((arith))??
  • Next by Date: Re: status on $[arith] for eval arith vsl $((arith))??
  • Previous by thread: Re: status on $[arith] for eval arith vsl $((arith))??
  • Next by thread: Re: status on $[arith] for eval arith vsl $((arith))??
  • Index(es):
    • Date
    • Thread
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.