🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3941

Re: Type of expression

#3941
From: Clive D.W. Feather
Date: Wed, 06 Sep 1995 18:42
14 lines
1156 bytes
In article <DEG4C6.6Ao@polo.demon.co.uk>,
John Winters <john@polo.demon.co.uk> wrote:
> Surely 0x80000000L is only too big for a long int on a 32 bit machine
> if you intend it to be interpreted as a positive number?  It fits in a
> 32 bit signed int fine, and represents -2147483648.

The C expression 0x80000000L is a way of writing the value 2147483648.
It is always a positive value. Since it won't fit in a 32-bin long int,
the language gives it the type unsigned long int.

-- 
Clive D.W. Feather                       | If you lie to the compiler,
clive@demon.net        (work, preferred) | it will get its revenge.
clive@stdc.demon.co.uk (home)            |   - Henry Spencer
Technical Details
Message-ID: <DEHyMv.E4r@stdc.demon.co.uk>
Path: arc1-ca.pugleaf.net!stdc.demon.co.uk!clive
References: <42df0h$73v@elf.bsdi.com> <42eu5d$jmq$1@mhafm.production.compuserve.com> <DEG4C6.6Ao@polo.demon.co.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!stdc.demon.co.uk!clive
From: clive@stdc.demon.co.uk (Clive D.W. Feather)
Newsgroups: comp.std.c
Subject: Re: Type of expression
Date: Wed, 6 Sep 1995 18:42:29 GMT
Organization: Demon Internet Limited (personal account)
Message-ID: <DEHyMv.E4r@stdc.demon.co.uk>
References: <42df0h$73v@elf.bsdi.com> <42eu5d$jmq$1@mhafm.production.compuserve.com> <DEG4C6.6Ao@polo.demon.co.uk>
Reply-To: clive@demon.net
X-NNTP-Posting-Host: stdc.demon.co.uk