On Tuesday 22 Nov 2011 20:14:57 you wrote:
> I want to test if a string is a number or a character and I am doing it by
> using parseInt() macro function. The output I get for the following macro
> is that a is a number. Can someone tell me where am I making the mistake?
What about using: isNaN(n)
From
http://imagej.nih.gov/ij/developer/macro/functions.htmlisNaN(n)
Returns true if the value of the number n is NaN (Not-a-Number). A common way
to create a NaN is to divide zero by zero. Comparison with a NaN always
returns false so "if (n!=n)" is equilvalent to (isNaN(n))". Note that the
numeric constant NaN is predefined in the macro language. The NaNs macro
demonstrates how to remove NaNs from an image.
Cheers
G