delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/07/07/07:41:56

From: Chris Mears <cmears AT bigpond DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: getch() mysteriously defined
Organization: only if absoultely necessary
Message-ID: <f5cbms4saju943qmc09vkfsbrjmvhamrld@4ax.com>
References: <8k470e$262$1 AT plato DOT wadham DOT ox DOT ac DOT uk> <8k4b0m$elr$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE>
X-Newsreader: Forte Agent 1.8/32.548
MIME-Version: 1.0
Lines: 25
Date: Fri, 07 Jul 2000 20:33:03 +1000
NNTP-Posting-Host: 203.54.70.161
X-Trace: newsfeeds.bigpond.com 962965464 203.54.70.161 (Fri, 07 Jul 2000 20:24:24 EST)
NNTP-Posting-Date: Fri, 07 Jul 2000 20:24:24 EST
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On 7 Jul 2000 10:22:14 GMT, that hoopy frood Hans-Bernhard Broeker
scribbled the following:

>J-P <jstacey AT plato DOT wadham DOT ox DOT ac DOT uk> wrote:
>> Does anyone know why this program works "as-is" i.e. with no extra
>> pre-compiler #include lines:
>
>It works for no better reason than luck, combined with some laziness
>of the makers of the C programming language, back in 1979.
>
>C allows you to call functions defined elsewhere even if you give it
>no information at all about their argument and return types, as is
>usually found in the relevant #include. In such cases, it'll assume
>that the function's return value is int, and all numeric arguments, if
>any, are int or double.

I have a small query on this: what about longs and long doubles?  I
thought that just default agrument promotions were performed
(char->int, short->int, float->double).

[snip]

-- 
Chris Mears
ICQ: 36697123

- Raw text -


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