From owner-freebsd-standards@FreeBSD.ORG Mon Jun 23 03:10:23 2003 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8835637B401 for ; Mon, 23 Jun 2003 03:10:23 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E96A43FDF for ; Mon, 23 Jun 2003 03:10:23 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h5NAANUp059087 for ; Mon, 23 Jun 2003 03:10:23 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h5NAANq7059086; Mon, 23 Jun 2003 03:10:23 -0700 (PDT) Date: Mon, 23 Jun 2003 03:10:23 -0700 (PDT) Message-Id: <200306231010.h5NAANq7059086@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org From: Wartan Hachaturow Subject: Re: standards/52972: /bin/sh arithmetic not POSIX compliant X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Wartan Hachaturow List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2003 10:10:23 -0000 The following reply was made to PR standards/52972; it has been noted by GNATS. From: Wartan Hachaturow To: Dag-Erling Sm?rgrav Cc: freebsd-gnats-submit@freebsd.org Subject: Re: standards/52972: /bin/sh arithmetic not POSIX compliant Date: Mon, 23 Jun 2003 14:06:19 +0400 On Mon, Jun 23, 2003 at 08:32:55AM +0200, Dag-Erling Sm?rgrav wrote: > Yes, it should be left as-is so the part of the code that evaluates > arithmetic expressions knows what variable is involved. For instance, > "$(($a+=1)) would expand to "$((1+=1))" before evaluation, which makes > no sense, while "$((a+=1))" clearly says to increase a with 1. Yes, the latter was the thing that I couldn't understand -- how may one implement +=, if variables are not required in arithmetic evaluation. But now, I've noticed the line I've missed while reading SUS: "Arithmetic Precision and Operations Integer variables and constants, including the values of operands and option-arguments, used by the standard utilities listed in this volume of IEEE Std 1003.1-2001 shall be implemented" Question is closed :) -- Regards, Wartan.