delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/22/04:51:15

Message-Id: <199709220850.SAA00347@rabble.uow.edu.au>
Subject: Re: %d
To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii)
Date: Mon, 22 Sep 1997 18:50:28 +1000 (EST)
Cc: djgpp AT delorie DOT com (DJGPP)
In-Reply-To: <Pine.SUN.3.91.970922091803.11436B-100000@is> from Eli Zaretskii at "Sep 22, 97 09:24:40 am"
From: Brett Porter <bporter AT rabble DOT uow DOT edu DOT au>
MIME-Version: 1.0

> 
> 
> In fact, altough ANSI C permits it, I'd advise against declaring *any* 
> functions (even with constant argument lists) with shorts or floats as 
> one of the arguments; I suggest to always use ints and doubles instead.
> 
I didn't realise this, and to make sure my code was compatible between16-bit
and 32-bit (when using Borland), I never used int types to ensure that they
always were what they were meant to be. Luckily, I'll never have to worry
about it again in DJGPP :)

I heard a rumour somewhere (some internet page) that in a 32-bit compiler,
you should always use 32-bit ints instead of shorts because they don't have
to be "played with" so much in the registers (sorry, I didn't know how to
say that). Is this true and would it really give that much of a speed gain?

Brett

-- 
"Give me ambiguity or give me something else"
--
Brett Porter
bporter AT rabble DOT uow DOT edu DOT au

http://www.geocities.com/CollegePark/Union/3596
	Humour, Programming, and more.

- Raw text -


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