Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!wuarchive!psuvax1!news From: flee@shire.cs.psu.edu (Felix Lee) Newsgroups: comp.lang.c Subject: Re: Another pitfall. Signed chars and ctype.h. Message-ID: Date: 10 Feb 90 02:27:28 GMT Sender: news@cs.psu.edu (Usenet) Organization: Penn State University Computer Science Lines: 12 Supersedes: John Woods wrote: > You have to say > isascii(*s) && isdigit(*s) According to _Standard C_ by Plauger and Brodie (the best reference I have), there is no "isascii". And "isdigit" etc. take an int in the set (EOF, 0..UCHAR_MAX), e.g., the possible return values of fgetc(). So, to write ANSI conformant C you must always say something like isdigit((unsigned char) *s) -- Felix Lee flee@shire.cs.psu.edu *!psuvax1!flee