Hello all,
I've been fixing bugs in Wcalc almost exclusively the past few days.
Managed to track down some pretty long-standing bugs (e.g. sometimes the
parser doesn't reset itself after an error right away), and fix them.
Now I've come to a bit of a decision point.
There's a conflict between binary or and absolute value. I originally
wanted |-4| to be 4, but by the same token, I want to be able to
calculate 12|4. Does anyone on this list have any particular opinions on
this?
Some options:
+ banish |-4|, and replace it with either [-4], abs(-4), or both
Pro: simple, C-like, fixes some abiguity
Con: brackets mean we can't use them for matrixes in the future, and
abs() is not exactly intuitive
+ banish 12|4, and replace it with some other symbol
Pro: preserves commonsense absolute value stuff
Con: commonsense absolute value stuff is inherently ambiguous (what
is |-4|-3|-2| ? is it |-4| * -3 * |-2| or is it
| -4 * |-3| * -2 |?), and I can't think of an easy binary-or
operator.
Any suggestions/opinions? (I have a tendency to go for #1)
~Kyle
--
UNIX was not designed to stop you from doing stupid thinkgs, because that would
also stop you from doing clever things.
-- Doug Gwyn