[comp.sys.mac.programmer] THINK C 4.0 libraries and oddities

simon@alberta.uucp (Simon Tortike) (10/05/89)

I recently received my Think C 4.0 update and immediately ran into a
couple of problems.  First, there is no console library on the disks.
Is this part of the new release, so that the reference to it in the 
standard libraries reference is obsolete?  Second, I have a discrepency
in scanf() behaviour when using a) the ANSI library and the 68881 and
68020 compiler options off, and b) the ANSI-881 library and the 68881
and 68020 compiler options on. I have a Mac IIx with system 6.0.2/F6.1
and 8 Mbytes of RAM.  In case a) the following simple example works fine:
main()
{
    float x, d;
    char * data[50];

    printf("Enter data name:\n");
    scanf("%s", data);
    printf("Data name is '%s'\n", data);
    printf("Enter x and d:\n");
    scanf("%f %f", &x, &d);
    printf ("Data name is '%s', x = %.2g, d = %.2g\n", data, (double) x, (double) d);
}
However, in case b) there is some garbage value in x.  I had another 
program in which this occurred, and the string was mangled, as well as the
values of the two float variables.  I know the doubles are handled differently
in the libraries, but should that matter here?  Furthermore, sin(), sinh(),
and sqrt() are missing from the library reference.
Thanks
-------------------
W. Simon Tortike,                         | tel    : 403/492-3338
Dept of Mining, Metallurgical             | fax    : 403/492-7219
      and Petroleum Engineering,          | CDNnet : simon@cs.UAlberta.CA
University of Alberta,                    | uucp   : simon@alberta.uucp
Edmonton, AB, CANADA T6G 2G6.             | 
-------------------
W. Simon Tortike,                         | tel    : 403/492-3338
Dept of Mining, Metallurgical             | fax    : 403/492-7219
      and Petroleum Engineering,          | CDNnet : simon@cs.UAlberta.CA