zsh-workers
 help / color / mirror / code / Atom feed
From: Matt <mc@prismtech.co.uk>
To: becker@Atria.com
Cc: zsh-workers@math.gatech.edu
Subject: Re: Math expressions with 08 or 09 -> zsh2.6-beta10
Date: Wed, 30 Aug 1995 15:27:51 +0100 (BST)	[thread overview]
Message-ID: <Pine.OSF.3.91.950830152404.511A-100000@alpha3.prismtech.co.uk> (raw)
In-Reply-To: <9508301350.AA01002@phobos>

> 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/
__________________________________________________________________________


      reply	other threads:[~1995-08-30 14:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-08-30 13:50 Paul H. Becker
1995-08-30 14:27 ` Matt [this message]

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=Pine.OSF.3.91.950830152404.511A-100000@alpha3.prismtech.co.uk \
    --to=mc@prismtech.co.uk \
    --cc=becker@Atria.com \
    --cc=zsh-workers@math.gatech.edu \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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).