|
From: Ethan A M. <merritt@u.washington.edu> - 2007-06-13 01:08:58
|
On Monday 11 June 2007 12:41, Daniel J Sebald wrote:
> >
> > 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.
--
Ethan A Merritt
|