|
From: Petr M. <mi...@ph...> - 2007-06-13 07:19:21
|
> > > I think you can use simply
> > > if (isanumber(c_token)) {
> > > act on integer
> > > }
>
> Unfortunately not.
> "isanumber" is mis-named. It really acts as "isapositivenumber".
> The reason is that the tokensiser places the - sign into its
> own separate token. So isanumber(c_token) sees only the '-' sign,
> no number.
>
> This has annoyed me many times, but never sufficiently to
> replace isanumber() with something better.
Does this mean that it is not possible to add a function "isaninteger()"
that woul work for negative numbers as well?
---
PM
|