lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


FYI, the "%lf" in fscanf("%lf",pDouble) requires a pointer-to-adouble.
I redefined LUA_NUMBER as single-precision float then noticed this.

#define LUA_NUMBER_SCAN		"%lf"

liolib.c:
static int read_number (lua_State *L, FILE *f) {
#if 0
  lua_Number d;
#else
  double d;
#endif
  if (fscanf(f, LUA_NUMBER_SCAN, &d) == 1) {

--
Jim Brooks