Zach <> writes:
> On Nov 18, 7:13Â*pm, "Default User" <defaultuse...@yahoo.com> wrote:
>> That's not a standard C function. Your compiler setting may be preventing
>> extensions to standard C headers like ctype.h from including non-standard
>> functions. Why are you using it?
>
> But gcc has no problem when I use other functions from ctype.h like
> isblank(). I need to check if a character (looping through a string)
> is valid or not. Before I was using "!isblank()" but isascii() seems
> to recognize more characters. This is part of a function that counts
> how many tokens are in a string.
isblank() is standard. isascii() isn't.
You're probably telling gcc to operate in standard-conforming mode,
which means that isascii() isn't going to be visible. If you
really want to use it, you'll need to turn off whatever options
you're using that are causing gcc to disable it.
But again, why are you using isascii()? Since it returns true for
any 7-bit character that fits into the 7-bit ASCII character set,
*including the space character*, I doubt that it's going to be
useful for your purpose.
--
Keith Thompson (The_Other_Keith)
kst- <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"