On Friday 13 Jun 2014 08:08:15 Lars Damgaard wrote:
> vars=split(line,",");
> a=vars[0];
> b=vars[1];
> c= b-a;
Aren't you trying to subtract two strings?
Perhaps you need to parse the string to a number.
parseFloat(string)
Converts the string argument to a number and returns it. Returns NaN (Not a
Number) if the string cannot be converted into a number. Use the isNaN()
function to test for NaN. For examples, see ParseFloatIntExamples.
parseInt(string)
Converts string to an integer and returns it. Returns NaN if the string cannot
be converted into a integer.
parseInt(string, radix)
Converts string to an integer and returns it. The optional second argument
(radix) specifies the base of the number contained in the string. The radix
must be an integer between 2 and 36. For radixes above 10, the letters of the
alphabet indicate numerals greater than 9. Set radix to 16 to parse
hexadecimal numbers. Returns NaN if the string cannot be converted into a
integer. For examples, see ParseFloatIntExamples.
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html