Tired of the primitive calculator program xcalc?
Do you keep a 20 year old calculator next to your desk, because it has more
features than your 21st-century calculator application on your 3GHz CPU?
Ever wish for a calculator application that would give you more automation
features - like variables, loops, and user-defined functions - but be more
convenient out-of-the-box than bc?
Then Hoc is for you!
Hoc is a simple, interactive, interpreted language for floating point
calculations. Its most basic use is to interactively evaluate expressions
such as 1+2*sin(0.7), but hoc also allows you to assign values to variables,
define your own functions, use loops and conditionals, and most other
features you'd expect in a programming language, using a simple C-like
syntax.
You can download it from here:
http://nadav.harel.org.il/homepage/hoc/
To Unix history fans, the name "hoc" may sound familar. Well, it should be.
Hoc was first published by Brian Kernighan and Rob Pike, in their 1984 book
"The Unix Programming Environment". In 1986, I typed in the code from the book
(I had a lot of free time - I was 11 years old at the time...), and started
improving it for my needs, something which I did, on and off, for about a
decade. The result is a version of hoc with significant improvements over
Kernighan & Pike's original version (see the list of differences in the
website).
Kernighan & Pike released their version of hoc as free software in 1995, using
a BSD-like license with attribution. My version is released under the same
license.
For more information about hoc, and short examples, you can also see hoc's
Wikipedia article:
http://en.wikipedia.org/wiki/Hoc_%28programming_language%29
Enjoy!
--
Nadav Har'El | Monday, Aug 13 2007, 29 Av 5767
[EMAIL PROTECTED] |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |Birthdays are good for you - the more you
http://nadav.harel.org.il |have the longer you live.
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]