ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ· ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ ³ History of revisions for QCALC -- Quick Calculator º ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ ÔÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ August 20, 1991 -- 1.00 Completed the initial version of QCALC. August 21, 1991 -- 1.01 Hacked out a parenthesis bug and a misconception concerning operator precedence. Added modulus and exponent [to the power] operators (%, ^). Added detection for division by zero. August 22, 1991 -- 1.02 Added floating point modulus. Improved argument parsing scheme. August 24, 1991 -- 1.03 Corrected value reader to recognize + and - value modifiers (ie, +5 and -2). Added mathematical functions: sin, cos, tan, asin, acos, atan, sqrt, and abs. August 27, 1991 -- 1.04 Revised the math function handler, and added the predefined constants pi and e. (Variables be on their way ...) August 28, 1991 -- 1.05 Added command line variables. Added two parameter function parsing and the function hypot. Still buggy. August 29, 1991 -- 1.06 Victory! Cranked out all (haha sure) variable and multi-parameter function bugs. Also fixed the limited sign modifying function to accept more than one modification. (ie, -5 was legal, but --5 wasn't. Now it is.) Added integer random function, but it stinks a bit. September 6, 1991 -- 1.07 Added better variable parsing. Variables can now be defined to full expressions, including references to variables previously defined on the command line. ie, /valice=100 /vbob=alice*(PI+2) September 7, 1991 -- 1.08 Improved the appearance of printed variables, and placed the reworked variable handler in it's own file. Separated text descriptions to a header file. Essentially, I just trimmed down the main file to a more manageable size again. Began working on my own number printing algorithm. Added log, logt, cosh, tanh, sinh. Passed the 1000 line source code mark. September 8, 1991 -- 1.09 Once again altered variables. Now, the /V switch is obsolete. To store an expression result in a variable, just prepend "var=" to it. ie: bob=100*5 will store 500 in bob. ... AH! Late at night, worked on many print options! (13 options switches in all now.) **MANY** errors, this is the buggiest revision. Ick. I'll wade through it tomorrow. September 9, 1991 -- 1.10 Cranked out several bugs. Added pretty help screens. (Awww...) September 12, 1991 -- 1.11 More bug cranking. Comma and decimal points switches both now work properly. Changed /F (list functions) to /L, and added /F (Financial representation -- turns on /$ /C /D2). Added single argument/multi parameters: /$CD2 is now a valid switch! (The one exception is the /S switch -- another switch may never follow it due to the strange way DOS handles "quotes" as arguments.) September 13, 1991 (friday) -- 1.12 Hacked apart the main file again -- this sets the stage for adding environment variables and taking input from files. Also, it cleared up some problems with multi-parameter single-arguments. /fnordf turns off the header printer, AND turns on financial number printing. Documented the switches in QCALC.DOC. Zzzz. Added /DM to allow control over trailing zeroes and whole numbers. Added "Switch error!" for bad switches when /EB is on. Corrected /B? changes so that newlines are printed for clarity when switching from /BA to /BO or /BF. Could be even clearer... September 14, 1991 -- 1.13 Worked further on documentation. Added more functions for a total of 4 constants, and 34 functions. Most, however, are trigonometric. Redid the help screens AGAIN. Added error handlers (floating point exception division by zero, overflow, domain, and control-c)! They SEEM to work, but only time will tell ... September 15, 1991 -- 1.14 Finished documenting 34 functions and most error conditions. More help screens, testing. Revised QCALC /? switches -- QCALC with no parameters simply says "type /? for switches", rather than giving the switch list. Rehacked multi-parameter passing, and added 11 financial functions: sln, syd, ddb, asln, asyd, addb, pmt, fv, fva, pv and pva. Total of 45 functions and 4 constants. However, for some reason, I don't trust Howard's financial functions. I may write my own. September 16, 1991 -- 1.15 Implemented the "Improper number of parameters" error. Split the gargantuan QCALC.H file into manageable portions. Implemented percentage printing (/%). Documented the rest of the functions, and added a lot of the extra garbage one is expected to add to documentation. I need some beta testers reaaaal soon. Changed the financial switch so it now "toggles". Changed the /FNORD switch so now it can be called anywhere from the command line. (ie QCALC 10 /FNORD now turns off the header.) Wrote several supplement files. September 17, 1991 -- 1.16 It never ends. Tried to do it simply, but it just can't be done that way, so I overhauled the argument parser again, making a new function called "getnextarg" that seems to work pretty neat. The difference is, this function first checks the environment variable "QCALC", parsing spaces into nulls, and returning them first. The big problem here was another discovery about DOS; The set command doesn't allow a = as part of the string! So, I had to make a decision, and I decided using SET was more important than the equal sign, so now to assign variables, use a colon instead of an equal sign. Added the underscore as a valid symbol character. September 18, 1991 -- 1.17 ARGH!! Tried to implement @filename, where if its own argument, will tell QCALC to load the file, and evaluate the expressions in there before continuing. Was hell. I think I need to do some major hacking. Also redirected all error messages to stderr. September 19, 1991 -- 1.18 Fixed the @filename command -- sorta -- Extra blank lines or missing CR's seem to be an ever increasing problem. I'll have to write a system for handling nulls. (Problem is because of the /BA switch.) Improved @file reader; now it recognizes a semicolon (;) as a comment, and a pound sign (#) as a string of text to print to the screen. Added functions and, or, xor, neg, if, eq, gt, lt, goe, and loe. (Logical and conditional functions.) Added variables TRUE and FALSE. Over 60 functions and constants! September 20, 1991 -- 1.19 Added a bunch of internal functions, and reworked the /B and /V switches to just /O. /O handles all output. Many, many options. Now nulls are not a problem, but my original problem about separator printing is back. I guess I'll have to calculate everything before I print it. That will allow several improvements in the long run, but it'll be hell getting there. September 21, 1991 -- 1.20 Fixed some problems with the getnextarg() function. Added strings to qcalc files. Added the "pause" character (the tilde ~) to script files. Internal variables are now truly constants -- user definable variables can be redefined, but internals can't. Symbol names can now include letters, numbers, and the underscore. September 22, 1991 -- 1.21 Script files can now be kept in the same directory as QCALC.EXE. If QCALC can't find the file in the current directory, it will look in the directory where QCALC resides. Added the !varname argument, which will prompt the user to input the variable named after the !. Added exponent reading. (10 can be expressed as 10, 1e1 or 1+e1.) Gave the exponent operator (^) higher precedence. Added operators & (and), $ and | (not), > and } (greater than), < and { (less than), >= and }= (greater than or equal to), <= and {= (less than or equal to). Guess it's ready for beta-testing -- I wish I had a complete script language, but that's so advanced, if I started it now, I'll never release QCALC. Septemeber 23 thru December 4, 1991 -- Bug fixin' time: 1.22 Fixed the /FNORD switch so it isn't case sensitive. Revised the input routine so it takes it's input directly from the keyboard, rather than STDIN, prints errors better, and handles backspacing. Corrected some blaring errors in the documentation. Added function POW (exponentation) like I was supposed to have had in there already. Changed function logt to log10 to reflect new ability of symbols having digits. Corrected exponent (1e+1) problem. Corrected inputing past the buffer bug. No longer have to supply a QC extension on script files. Fixed inability for multiparameter functions to contain a non- parenthetical expression. Corrected error with commas. Corrected incorrect DOS errorlevel when inputing from a !var. Released QCALC (hoorah!). December 10, 1991 -- 1.23 ARGH! Discovered two major bugs. The first one was a precedence error that unfortunately returns an incorrect answer in complex equations using operators with varying precedence. The second was parenthesis defaulting to multiplication; when a variable followed a parenthesis such as "(5)a", it would report an error. Corrected both errors. Prayed that I've fixed all major errors. Re-released QCALC