Re: macro array value limit

Posted by Gabriel Landini on
URL: http://imagej.273.s1.nabble.com/macro-array-value-limit-tp3701176p3701177.html

On Thursday 26 October 2006 16:08, Michael Doube wrote:
> What happens is that in the if loop, values bigger than 9.99 and 9999
> are ignored. The arrays do contain bigger values, but somehow they are
> excluded from the 'if'. I can print out values bigger than 9.99 and 9999
> (if I simply print the arrays as soon as they are parsed). This means
> that when the true maximum of the array should be 11.38 (for example),
> if I print my max (from the if loop) it is reported as 9.99.
>
> ImageJ version 1.37r, Java 1.3.1_13, WinXP

Did try this on the latest version of IJ (which is 1.37u)?

Another suggestion is to make sure that the splitting is parsed from string
into a number correctly by using any of these macro functions:

parseFloat(string)
parseInt(string)
parseInt(string, radix)

Cheers,

G.