cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/11/23:38:42

From: Chris Holmes <cholmes AT surfsouth DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: EUREKA... note about pcx header
Date: Tue, 10 Aug 1999 22:27:57 -0400
Organization: Georgia Institute of Technology, Atlanta GA, USA
Lines: 30
Message-ID: <37B0DFAD.2AE5@surfsouth.com>
References: <Dd1s3.242$dr6 DOT 4824 AT news1 DOT rdc2 DOT on DOT home DOT com> <37B0BE23 DOT 2326F43C AT id-base DOT com>
NNTP-Posting-Host: r69h109.res.gatech.edu
Mime-Version: 1.0
X-Trace: news-int.gatech.edu 934338644 24650 128.61.69.109 (11 Aug 1999 02:30:44 GMT)
X-Complaints-To: usenet AT news DOT gatech DOT edu
NNTP-Posting-Date: 11 Aug 1999 02:30:44 GMT
X-Mailer: Mozilla 3.04Gold (Win95; I)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

sephiroth wrote:
> 
> Yes, you just discovered a miracle. Well not really. From my knowledge just
> putting "int" as the data type will make an integer which can vary between short
> or long I think( in a technical way, sorry it's 1:04am and I want to go to bed).
> But when you write the int to a file it writes it as a long, same a reading.
> Amazing? I always get by this problem by specifically defining a short or a
> long. I think this is good practice.

  Most protected mode compilers compile based on a 32 bit integer.  
DJGPP does this.  
  For anyone who doesn't already know this (it is pretty common 
knowledge), in DJGPP:
  char = 1 byte
  short = 2 bytes
  int = 4 bytes
  long = 8 bytes

  And please don't ask about the time I took a new way to do fixed 
point math to a CS professor who thought it was brilliant and he sent
me to a Computer Engineering prof who said, "Yes, congrats, you just 
rediscovered floating point."  That was a bad day.

  Chris

-- 
I know that I will never be politically correct,
and I don't give a damn about my lack of etiquette!
-- Meatloaf

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019