Short: Replacement for Eval Author: jive@algonet.se (Jesper Wilhelmsson) Uploader: jive@algonet.se (Jesper Wilhelmsson) Version: 1.0 Type: util/cli Replaces: Eval, distributed with Amiga OS. Requires: A brain I have for some time been very unsatisfied with the functions of the tool eval, included in Amiga OS. I was hoping for an update in Amiga OS 3.5 but nothing has been done to this tool. Therefor I have written my own tool for mathematical evaluations. The worst things about the old eval: * It can't count! 1+2*3 should equal 7 not 9!! (no priorities?) * No suport for binary numbers * No support for decimal numbers * Too few functions * Not flexible enough to be userfriendly * No bugfixes or upgrades are made from the developer Ev is improved in theese areas and some other: * The prioritys are correct! 1+2*3 = 7 * Ev supports all the old Eval input for compability reasons (except for a few changes) * Support for binary numbers added in input and output * The constants pi and e added * Support for decimal numbers added, both 0.1 and .1 are accepted * Correct rounding of decimals * New flexibility added with support for: * the words and (&), or (|), not (~) * both <<, >> and lsh, rsh (and l, r) * d## and %d for decimal input and output * *t for tab in output * Number of digits in octal and hexadecimal output is optional * multiplication without '*'-token in obvious places * Several new functions: * absolute value (abs) * square root (sqrt) * faculty (!) * powered numbers (^) * trigonometric functions (sin, cos, tan) * random number (rnd) + I will keep upgrading it if there is a need for that. Downside of the new version: * Bigger executable. I've used the tools bison and flex to create the parser and theese tools do not create small files. The executable is now ~30k. * eqv not implemented yet. I haven't got the full insight in what this function really does, is there a c equivalence? * e does not mean eqv any more since the number e=2.718281828... * Since I don't have the standard c include files for Amiga OS, I had to do all argument handling manually. This seems to have a negative effect on the behaviour of Ev in scripts. For example the test script in the manual for OS 3.5 with Eval used as a counter will not work with Ev. However I did not create Ev to be used as a simple counter. I hope thats it. ============================= Archive contents ============================= Original Packed Ratio Date Time Name -------- ------- ----- --------- -------- ------------- 2802 1850 33.9% 13-Jan-00 00:32:40 Ev.info 31360 13846 55.8% 13-Jan-00 02:52:40 +Ev 13965 5715 59.0% 13-Jan-00 02:50:36 +Ev.Guide -------- ------- ----- --------- -------- 48127 21411 55.5% 13-Jan-100 20:31:02 3 files