Path: utzoo!attcan!uunet!lll-winken!lll-tis!mordor!joyce!ames!ucsd!rutgers!att!alberta!simon From: simon@alberta.UUCP (Simon Tortike) Newsgroups: comp.sys.mac.programmer Subject: double strtod(char *s, char **endp) easy Summary: C is such a nice language---I did it already Message-ID: <1587@pembina.UUCP> Date: 12 Sep 88 19:05:14 GMT References: <1585@pembina.UUCP> Organization: U. of Alberta, Edmonton, AB Lines: 20 In article <1585@pembina.UUCP>, simon@alberta.UUCP (Simon Tortike) writes: > I am writing an application that requires me to change a string into a > float or double number. The input is already partly filtered (a filterproc > in a modal dialog) but I still need to check the exponentiation, etc. > K&R (2nd. ed) document `double strtod(const char *s, char **endp)' as part > of the header file , which returns information in *endp whether > the entire string was converted. In my case, I wish to reject the number (sheepishly) well I suppose I should have tried harder before mailing this, but I have a perfectly good form of strtod now. If anyone wants a copy I'll mail it to them. By the way, has anyone else noticed that the Stubs.c file for use when making MPW tools in C removes the floating point formatting? I got garbage for two hours before I realised my programming ability wasn't all that bad. > ------------------- > Simon Tortike, Department of Mining, Metallurgical and Petroleum Engineering, > The University of Alberta, Edmonton, AB, CANADA T6G 2G6. > simon@alberta.uucp | AGT: 403/432-3338 | stortike@ualtavm.bitnet (That's me.)