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

Re: Octal interpretation

> I am heartily sick of being told my stack is unbalanced because the
> time happens to be 12:08.  Based on the following two facts,
> 1) No valid octal number ever starts 08 or 09
> 2) 08 and 09 are the only two digit numbers evaluated incorrectly
> I would like to propose that zstrtol explicitly checks for an 8 or a 9
> following the 0 and if there is one evaluates it in decimal.  This
> will mean times can be handled properly --- what I mainly use
> arithmetic in zsh for anyway --- while real octal numbers won't be
> affected.
> Anybody writing scripts for users where this may matter should in any
> case be stripping leading 0's as a matter of course.  If that's a big
> problem, we should simply remove octal handling.  (What's wrong with
> 8#77 etc. anyway?  Isn't this just why ksh introduced that syntax?)

I've been planning on getting back to this.  My first thoughts are to
just reverted back to decimail as the default.


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