The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Chet Ramey <chet.ramey@case.edu>
To: Michael Siegel <msi@malbolge.net>
Cc: tuhs@minnie.tuhs.org
Subject: Re: [TUHS] Arithmetic expansion in Unix shells
Date: Mon, 21 Jun 2021 10:48:18 -0400	[thread overview]
Message-ID: <bf61298e-9f69-d091-1e6c-763e413f719b@case.edu> (raw)
In-Reply-To: <20210621164315.1587cffe@moon>

On 6/21/21 10:43 AM, Michael Siegel wrote:
> Am Mon, 21 Jun 2021 09:50:38 -0400
> schrieb Chet Ramey <chet.ramey@case.edu>:
> 
>> The $((...)) form of arithmetic expansion is something POSIX picked up
>> from ksh-88, eventually. The early drafts of the standard (through
>> 1003.2 d9, at least), used $[...], but they eventually adopted
>> $((...)) because ksh-88 had already implemented it, though it's not
>> documented in Bolsky and Korn.
> 
> So, in other words, POSIX shell (meaning the shell described in the
> standard as it has been released) had double-parentheses arithmetic
> evaluation from the start?

 From the first published version of the standard, yes.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

  reply	other threads:[~2021-06-21 14:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-21  9:37 Michael Siegel
2021-06-21  9:57 ` arnold
2021-06-21 13:50   ` Chet Ramey
2021-06-21 14:43     ` Michael Siegel
2021-06-21 14:48       ` Chet Ramey [this message]
2021-06-22 16:24         ` Michael Siegel
2021-06-22 15:52 Brian Walden

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bf61298e-9f69-d091-1e6c-763e413f719b@case.edu \
    --to=chet.ramey@case.edu \
    --cc=msi@malbolge.net \
    --cc=tuhs@minnie.tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).