[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: expr say "non integer argument"
From: |
Eric Blake |
Subject: |
Re: expr say "non integer argument" |
Date: |
Thu, 18 Feb 2010 06:44:37 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 |
According to Chris F.A. Johnson on 2/18/2010 6:20 AM:
> On Thu, 18 Feb 2010, address@hidden wrote:
>
>> $ expr 3.1 + 3
>> expr: non-numeric argument <---say "non integer argument"
>> $ expr 3.1 + 3b
>> expr: non-numeric argument
>
> The expr command's arithmetic only works with integers.
But that's not his point. The point is that 3.1 is numeric, so the error
could be fine-tuned to state that expr expects integers to make it clear
that numeric but non-integer is the reason for the failure. And I'm
inclined to agree. I see nothing in POSIX that requires the current error
string, or forbids a more specific error string.
jidanni, it would be a two-line patch to expr.c. Would you care to write
such a patch, rather than just complaining?
--
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
signature.asc
Description: OpenPGP digital signature
- expr say "non integer argument", jidanni, 2010/02/18
- Re: expr say "non integer argument", Chris F.A. Johnson, 2010/02/18
- Re: expr say "non integer argument", jidanni, 2010/02/18
- Re: expr say "non integer argument",
Eric Blake <=
- Re: expr say "non integer argument", jidanni, 2010/02/18
- Re: expr say "non integer argument", Eric Blake, 2010/02/18
- Re: expr say "non integer argument", jidanni, 2010/02/18
- diff "--git", jidanni, 2010/02/18
- Re: diff "--git", Alfred M. Szmidt, 2010/02/18
- Re: diff "--git", jidanni, 2010/02/18
- RE: expr say "non integer argument", Voelker, Bernhard, 2010/02/18
- Re: expr say "non integer argument", Eric Blake, 2010/02/18
- RE: expr say "non integer argument", Voelker, Bernhard, 2010/02/19
- Re: expr say "non integer argument", Jim Meyering, 2010/02/19