home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / c / 19476 < prev    next >
Encoding:
Text File  |  1993-01-09  |  918 b   |  29 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!taumet!steve
  3. From: steve@taumet.com (Steve Clamage)
  4. Subject: Re: Problem with Turbo-C: calculating with pointers 
  5. Message-ID: <1993Jan9.161934.12871@taumet.com>
  6. Organization: TauMetric Corporation
  7. References: <1993Jan7.112219.578@reks.uia.ac.be> <726524790snz@panache.demon.co.uk>
  8. Date: Sat, 9 Jan 1993 16:19:34 GMT
  9. Lines: 18
  10.  
  11. raph@panache.demon.co.uk (Raphael mankin) writes:
  12.  
  13. >>long size;
  14. >>
  15. >>size=71800;
  16. >      ^^^^^
  17. >make this 71800L and it will work. This compiler like many others treats integer
  18. >cosntants as 16-bit ints. 61800-65536 == 6264.
  19.  
  20. This had better not make any difference, and in fact makes no difference
  21. with Borland C.
  22.  
  23. The rule in C is that a decimal integer literal is type int if the value
  24. will fit in an int, and type long otherwise.  Thus, 71800 and 71800L have
  25. exactly the same value and type.
  26. -- 
  27.  
  28. Steve Clamage, TauMetric Corp, steve@taumet.com
  29.