home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!taumet!steve
- From: steve@taumet.com (Steve Clamage)
- Subject: Re: Problem with Turbo-C: calculating with pointers
- Message-ID: <1993Jan9.161934.12871@taumet.com>
- Organization: TauMetric Corporation
- References: <1993Jan7.112219.578@reks.uia.ac.be> <726524790snz@panache.demon.co.uk>
- Date: Sat, 9 Jan 1993 16:19:34 GMT
- Lines: 18
-
- raph@panache.demon.co.uk (Raphael mankin) writes:
-
- >>long size;
- >>
- >>size=71800;
- > ^^^^^
- >make this 71800L and it will work. This compiler like many others treats integer
- >cosntants as 16-bit ints. 61800-65536 == 6264.
-
- This had better not make any difference, and in fact makes no difference
- with Borland C.
-
- The rule in C is that a decimal integer literal is type int if the value
- will fit in an int, and type long otherwise. Thus, 71800 and 71800L have
- exactly the same value and type.
- --
-
- Steve Clamage, TauMetric Corp, steve@taumet.com
-