Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Math expressions with 08 or 09 -> zsh2.6-beta10



These leading zeros are inconsistent.  Math expressions do not seem to
like numbers 08 or 09.

    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
    % [ 07 -gt 08 ] && echo ok
    zsh: bad math expression: unbalanced stack
    % [ 07 -gt 09 ] && echo ok
    zsh: bad math expression: unbalanced stack

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
    % echo $x
    7
    % echo $ZSH_VERSION
    2.6-beta10


(thanks for your work on the best shell out there...)
------------------------------------------------------------------------------
Paul Becker              o       Atria Software       main:    508-650-5100
(508)650-5116           /~>     24 Prime Park Way     fax:     508-647-1760
becker@xxxxxxxxx     o...(\     Natick, MA  01760  <URL://http:/www.atria.com/>
-----------------  ~~~~~~~~~~  -----------------------------------------------

New ! Effective September 5, 1995
------------------------------------------------------------------------------
Paul Becker              o       Atria Software       main:    617-676-2400
(617)676-2605           /~>     20 Maguire Road       fax:     617-676-2410
becker@xxxxxxxxx     o...(\     Lexington, MA  02173  http://www.atria.com/
-----------------  ~~~~~~~~~~  -----------------------------------------------



Messages sorted by: Reverse Date, Date, Thread, Author