Date: Mon, 23 Jun 2003 03:10:23 -0700 (PDT) From: Wartan Hachaturow <wart@tepkom.ru> To: freebsd-standards@FreeBSD.org Subject: Re: standards/52972: /bin/sh arithmetic not POSIX compliant Message-ID: <200306231010.h5NAANq7059086@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR standards/52972; it has been noted by GNATS. From: Wartan Hachaturow <wart@tepkom.ru> To: Dag-Erling Sm?rgrav <des@des.no> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200306231010.h5NAANq7059086>