home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!unix!updike!ric
- From: ric@updike..sri.com (Richard Steinberger)
- Newsgroups: comp.lang.c
- Subject: strtol() return values
- Message-ID: <ric.728002623@updike>
- Date: 25 Jan 93 22:57:03 GMT
- Sender: news@unix.SRI.COM
- Lines: 11
-
-
- strtol() returns a long int when successful. If a non-numeric
- string is encountered, 0 is returned. Unfortunately, errno doesn't seem
- to be set. Here's the question: If a string like, "0" or "000"
- is encountered, I also get a 0 returned from strtol(). Is there an easy,
- elegant way to check for this without examing each char?
-
- ric steinberger
- ric@updike.sri.com
-
-
-