zsh-workers
 help / color / mirror / code / Atom feed
From: hzoli@cs.elte.hu (Zoltan Hidvegi)
To: coleman@math.gatech.edu (Richard Coleman)
Cc: zsh-workers@math.gatech.edu (zsh-workers)
Subject: Re: intepreting octal and globbing breakage
Date: Mon, 22 May 1995 19:39:54 +0100 (MET DST)	[thread overview]
Message-ID: <9505221739.AA04229@turan.elte.hu> (raw)
In-Reply-To: <9505221651.AA23094@redwood.skiles.gatech.edu> from "Richard Coleman" at May 22, 95 12:51:06 pm

> That's one of the reasons I just made a test release rather than the
> real thing.  I'll probably have to go back using zstrtol.  That would
> also make it easy to fix it so that numbers beginning with '0' are not
> interpreted as octal.  I sorta hate to do this, since then zstrtol
> would be even more incompatible with the standard strtol.  I also hate

Why? It can be compatible with the standard, but we should call it with base
10 from zzlex.

> the idea of interpreting 0xff has hex, but not interpreting 010 as
> octal.  I also hate the idea of adding (yet another) option to control
> this.
> 
> What does ksh and bash do?  I'm inclined to go with the principle of
> least surprise and make this compatible with however the other shells
> handle this.

Bash version 1.14.3 always treat 010 az octal and 0xff as hex in math, and it
segfaults on echo $[09] (at least with Solaris 2.3) :-). ksh ignores leading
zeros. I see that interpreting 0xff as hex but 010 as decimal is not too
elegant, but it does not hurt anyone. The alternative is to give unballanced
stack error on 0xff and if I have to choose I'd choose 0xff to be a hex
number. It can be done in zzlex.

Zoltan


      reply	other threads:[~1995-05-22 17:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-05-19  9:35 test release Richard Coleman
1995-05-20 17:55 ` Mark Borges
1995-05-22 16:51   ` intepreting octal and globbing breakage Richard Coleman
1995-05-22 18:39     ` Zoltan Hidvegi [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=9505221739.AA04229@turan.elte.hu \
    --to=hzoli@cs.elte.hu \
    --cc=coleman@math.gatech.edu \
    --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).