comp.lang.ada
 help / color / mirror / Atom feed
From: hpcc05!hpbbn!hpugrca!thomas@hplabs.hpl.hp.com  (Thomas Buenermann)
Subject: Re: Numeric problem with Ada
Date: 21 Nov 91 08:57:38 GMT	[thread overview]
Message-ID: <3690001@hpugrca.GRC.HP.COM> (raw)

K&R C (pre-ANSI, pre-Std. C) specified that all floating point
expressions will be propagated to double. And parameter passing
is an expression. Thus, floating point values will always be put
on the stack as double, and printf expects them this way.

(If the formal parameter is a float, the function must read the 
double from the stack and store it back as a float before entering 
the body of the function.)

- Thomas

#include <std/disclaimer.h>

Thomas Buenermann	thomas@hpugrca.grc.hp.com
HP-UX Kernel & 		Thomas BUENERMANN / HP 8340/00
Language Support	Hewlett-Packard GmbH, Support-Zentrum
CRC Germany		Berliner Str. 111, D-4030 Ratingen, FRG

             reply	other threads:[~1991-11-21  8:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1991-11-21  8:57 Thomas Buenermann [this message]
  -- strict thread matches above, loose matches on Subject: below --
1991-11-27 16:19 Numeric problem with Ada CNAM.CNAM.FR!bortz
1991-11-19 18:30 psinntp!vitro.com!v7.vitro.com!vaxs09
1991-11-19 14:05 Jean-Pierre Rosen
1991-11-19  0:23 Jim Giles
1991-11-14  9:53 Jan Kok
1991-11-13 19:48 CNAM.CNAM.FR!bortz
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox