TC++: "floating point formats not linked"
Walter Bright
bright at nazgul.UUCP
Sun Feb 24 04:28:12 AEST 1991
In article <LT5NQEC at methan.chemie.fu-berlin.de> kirste at methan.chemie.fu-berlin.de (Burkhard Kirste) writes:
/>In TC++, running in "C" mode , the following code gives the error message:
/>"scanf: floating point formats not linked"
/>How do I link them?
/> float *w
/> fscanf(fp,"%f\n",w);
/I have found that a statement such as
/ atof("");
/would help. Anyway, I think that this "feature" of TC is a nuisance.
In TC, the floating point library is only linked in if one of the OBJ files
for the program contained a floating point operation. This is nice because
if you don't use floating point you don't carry around the bulk of the library
code. The downside is this causes a significant burden on the tech support,
as I have seen this one problem appearing over and over again for *years*.
In ZTC, we use the opposite approach. Floating point is always linked in
by default. If you don't need it, then compile with -mi or link in the
INT.OBJ object module. The upside is we never get tech support calls like
the one above. The downside is many people never notice the -mi switch and
wind up thinking that ZTC generates unnaturally large EXE files. Even many
magazine reviewers have fallen into this error.
I'm all ears if anyone has a suggestion on how to get the best of both
by default.
More information about the Comp.lang.c
mailing list