From: James William Pye <flaw@rhid.com>
To: Dan Nelson <dnelson@allantgroup.com>
Cc: zsh-workers@sunsite.dk
Subject: Re: [bug?] test adf -ge 0
Date: Tue, 31 Aug 2004 16:21:08 -0700 [thread overview]
Message-ID: <1093994468.69019.184.camel@localhost> (raw)
In-Reply-To: <20040831191131.GG33896@dan.emsphone.com>
[-- Attachment #1: Type: text/plain, Size: 962 bytes --]
On Tue, 2004-08-31 at 12:11, Dan Nelson wrote:
> Probably because atoi("sdf") returns 0, so the test succeeds.
Indeed, without errno being set too, as you are probably aware.
FreeBSD(likely, NetBSD as well) uses strtol, which is how they catch the
error.
> /bin/sh on Tru64 5.1, AIX 5.2, and Solaris 9 all succeed.
Wow, just when I thought I was writing portable scripts! /;
> It's probably in the range of "undefined behaviour". I can't find any
> manpages or standards docs that say that test must verify that numeric
> arguments are really numbers.
I looked at what OpenGroup.org had, but nothing regarding the subject
seemed to be specified.
http://www.opengroup.org/onlinepubs/009695399/utilities/test.html
This doesn't match up to the version FreeBSD's test is said to comply
to, so I don't know for sure if FreeBSD's test is complying specified
behaviour or just historic on BSDs. =\
--
Regards,
James William Pye
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 479 bytes --]
prev parent reply other threads:[~2004-08-31 23:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-31 18:22 James William Pye
2004-08-31 19:11 ` Dan Nelson
2004-08-31 20:33 ` DervishD
2004-08-31 21:16 ` Bart Schaefer
2004-08-31 23:21 ` James William Pye [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=1093994468.69019.184.camel@localhost \
--to=flaw@rhid.com \
--cc=dnelson@allantgroup.com \
--cc=zsh-workers@sunsite.dk \
/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).