Subject: Re: READ-FROM-STRING considered unsafe? (was Re: Simple Function Question)
From: Erik Naggum <>
Date: 1999/05/25
Newsgroups: comp.lang.lisp
Message-ID: <>

* Johan Kullstam <>
| [1] C cannot pass floats, only doubles hence both floats and doubles
| are printed with %f but scanned with %f and %lf respectively.

  FWIW, this is no longer true.  ANSI C, published a decade ago, specified
  that if the prototype is in scope, a function call should coerce an
  argument to the appropriate numeric type, including short, float, etc,
  and the function can expect the object to have the specified type.  if
  the prototype is not in scope, certain defaults apply that should cause
  an error to be reported when a conflicting prototype is seen.

  the reason C cannot do %f as anything but double is that there is no
  prototype for printf (etc) that could request any particular type, hence
  the default conversions apply.

@1999-07-22T00:37:33Z -- pi billion seconds since the turn of the century