On 13 May 2010, at 15:23, erik quanstrom wrote:
echo 1 2 | hoc -e '{while(read(x) != 0)y += x' ^ $nl ^ ' print y,
"\n"}'
Maybe it makes a sense to add in hoc(1) expression delimiter like a
';'?
i don't use hoc very often. i tend to use acid. (!)
this is because hoc won't do bit operations and doesn't
accept hex.
Acid is nicer than dc or bc for this? I don't do much in the way of
programming calculations at present and usually resort to dc to do
them. Anything more convenient would be appreciated. :)
As for hoc, I'm mostly doing floating-point work where presentation is
irrelevant, so it's quite useful for me, but too often I find myself
preferring to use one of those silly graphical calculator applications
just to cut down on the visual noise.
--
Simplicity does not precede complexity, but follows it. -- Alan Perlis