Pádraig Brady wrote:
> -------- Original Message --------
> Date: Tue, 07 Oct 2008 11:55:51 +0100
> From: Pádraig Brady <[EMAIL PROTECTED]>
> To: Chet Ramey <[EMAIL PROTECTED]>
> CC: [EMAIL PROTECTED]
> 
> I was just discussing bit shifting with Tim Hockin using shell
> arithmetic expansion, and he pointed out that bash and ksh
> use arithmetic rather than logical shift for the >> operator.

Actually, bash and ksh use whatever the native C compiler implements,
since both just translate the >> and << into the same operators
internally.

I don't see a really compelling reason to change, since, as you say,
the standard requires signed long ints.

> I know the opengroup spec says to use signed ints,
> but I think that is intended to disambiguate input and output,
> rather than defining internal operations.

You might send a message to the austin group asking for an opinion.
That would give you a better sense of the standard's intent.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU    [EMAIL PROTECTED]    http://cnswww.cns.cwru.edu/~chet/


Reply via email to