Re: expr integer format always decimal?

2004-09-12 Thread Andreas Schwab
[EMAIL PROTECTED] (Bob Proulx) writes: > Andreas Schwab wrote: >> Bob Proulx writes: >> > Paul Eggert wrote: >> >> So, under your interpretation, "expr 010" would print 8, but "expr 010 >> >> + 0" would print 10? That doesn't sound right to me. >> > >> > My question was why couldn't a conforming

Re: expr integer format always decimal?

2004-09-11 Thread Bob Proulx
Andreas Schwab wrote: > Bob Proulx writes: > > Paul Eggert wrote: > >> So, under your interpretation, "expr 010" would print 8, but "expr 010 > >> + 0" would print 10? That doesn't sound right to me. > > > > My question was why couldn't a conforming implementation interpret 010 > > as octal and th

Re: expr integer format always decimal?

2004-09-11 Thread Paul Eggert
[EMAIL PROTECTED] (Bob Proulx) writes: > Note that I am not trying to change the behavior of expr but only to > understand what the standard allows for its behavior. Ah, sorry, I thought you wanted us to extend "expr". > How can clarifying the standard to more strongly say that arguments > are i

Re: expr integer format always decimal?

2004-09-11 Thread Andreas Schwab
[EMAIL PROTECTED] (Bob Proulx) writes: > Paul Eggert wrote: >> So, under your interpretation, "expr 010" would print 8, but "expr 010 >> + 0" would print 10? That doesn't sound right to me. > > My question was why couldn't a conforming implementation interpret 010 > as octal and therefore print a

Re: expr integer format always decimal?

2004-09-11 Thread Bob Proulx
Paul Eggert wrote: > Bob Proulx writes: > > integer > > An argument consisting only of an (optional) unary minus followed by > > digits. > > It also says, for example: > expr1 + expr2 Addition of decimal integer-valued arguments. Hmm... Yes, but it could also be read that only decimal in

Re: expr integer format always decimal?

2004-09-10 Thread Paul Eggert
[EMAIL PROTECTED] (Bob Proulx) writes: > integer > > An argument consisting only of an (optional) unary minus followed by > digits. It also says, for example: expr1 + expr2 Addition of decimal integer-valued arguments. So, under your interpretation, "expr 010" would print 8, but "expr 0

Re: expr integer format always decimal?

2004-09-10 Thread Bob Proulx
Paul Eggert wrote: > Bob Proulx writes: > > However, I can't see anywhere that expr is defined to always read > > integers as decimal values. > > The current documentation says under "expr invocation" > > Operands are either integers or strings. Integers consist of one or > more decimal digits,

Re: expr integer format always decimal?

2004-09-09 Thread Paul Eggert
[EMAIL PROTECTED] (Bob Proulx) writes: > However, I can't see anywhere that expr is defined to always read > integers as decimal values. The current documentation says under "expr invocation" Operands are either integers or strings. Integers consist of one or more decimal digits, with an option

expr integer format always decimal?

2004-09-09 Thread Bob Proulx
I recently suggested that expr could be used to convert values from user input or other places to strict decimal form. And it can validate non-numberic input easily. Example: expr 08 + 0 8 expr foo + 0 expr: non-numeric argument However, I can't see anywhere that expr is defined to alwa