mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2025-02-18 05:30:29 +00:00
handle NaN
This commit is contained in:
parent
1ee6cf4115
commit
0ee07d662a
@ -125,6 +125,8 @@ class Cell implements Comparable<Cell>, Value
|
||||
return justify (value.getText (), colWidth);
|
||||
|
||||
Double thisValue = value.getValue ();
|
||||
if (thisValue.isNaN ())
|
||||
return justify ("NaN", colWidth);
|
||||
|
||||
char format = cellFormat != ' ' ? cellFormat : defaultFormat;
|
||||
if (format == 'I')
|
||||
@ -213,7 +215,7 @@ class Cell implements Comparable<Cell>, Value
|
||||
{
|
||||
if (!isValue ())
|
||||
{
|
||||
// System.out.println ("Not a value");
|
||||
// System.out.println (value);
|
||||
return this;
|
||||
}
|
||||
assert isValue () : "Cell type: " + type + " @ " + address;
|
||||
|
@ -31,6 +31,7 @@ class Count extends Function
|
||||
if (cell.getValue () != 0.0)
|
||||
value++;
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
}
|
@ -272,6 +272,7 @@ class Expression implements Value
|
||||
else if (text.charAt (ptr) == '(')
|
||||
++depth;
|
||||
}
|
||||
|
||||
return text.substring (0, ptr + 1); // include closing parenthesis
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user