From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu (gatech.edu [130.207.244.244]) by werple.mira.net.au (8.6.12/8.6.9) with SMTP id AAA23979 for ; Thu, 31 Aug 1995 00:26:15 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA17642 (5.65c/Gatech-10.0-IDA for ); Wed, 30 Aug 1995 10:25:08 -0400 Received: by math (5.x/SMI-SVR4) id AA28493; Wed, 30 Aug 1995 10:20:06 -0400 Resent-Date: Wed, 30 Aug 1995 15:27:51 +0100 (BST) Old-Return-Path: Date: Wed, 30 Aug 1995 15:27:51 +0100 (BST) From: Matt To: becker@Atria.com Cc: zsh-workers@math.gatech.edu Subject: Re: Math expressions with 08 or 09 -> zsh2.6-beta10 In-Reply-To: <9508301350.AA01002@phobos> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Resent-Message-Id: <"j5hAZ2.0.7z6.LE7Hm"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/345 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > These leading zeros are inconsistent. Math expressions do not seem to > like numbers 08 or 09. i dont know if this actually applies to this instances but ... just a guess but isnt any number with a leading zero treated as an octal number(base 8)? > > zsh -f > % [ 03 -gt 07 ] && echo ok > % [ 07 -gt 03 ] && echo ok > ok > % [ 07 -gt 07 ] && echo ok > % [ 08 -gt 07 ] && echo ok > zsh: bad math expression: unbalanced stack in this case the number '08' will be unrecognised... > % [ 07 -gt 08 ] && echo ok > zsh: bad math expression: unbalanced stack in this case the number '08' will be unrecognised... > % [ 07 -gt 09 ] && echo ok > zsh: bad math expression: unbalanced stack in this case the number '09' will be unrecognised... > > in an effort to stip off the leading zero.... > > % let x=01 > % echo $x > 1 > % let x=07 > % echo $x > 7 > % let x=08 > zsh: lvalue required in this case the number '08' will be unrecognised... > % echo $x > 7 dont know about this - but it seems to be regressing to the last officially 'valid' set value.... ie '07' > % echo $ZSH_VERSION > 2.6-beta10 > now i dont know if what i described is the supposed behaviour or not ... dont grill me if i am wrong please ....... [my mail box is only so big..!] matt. Thought for the Day: Darth Vader sleeps with a Teddywookie. __________________________________________________________________________ Prism Technologies Ltd., | Matt KingFisher House, Kingsway, | Tel No. +44 (0)191 491 3983 Team Valley, Gateshead, | Fax No. +44 (0)191 491 3973 Tyne & Wear, | EMail. mc@prismtech.co.uk NE11 0JQ, U.K. | WWW Page http://www.prismtech.co.uk/ __________________________________________________________________________