home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff210.lzh / Calc / calc3.0.doc < prev    next >
Text File  |  1989-05-02  |  9KB  |  253 lines

  1.                         *** NEW FEATURES OF CALC3.0 ***
  2.  
  3. 1.      Fixes a bug that prevents calc2.0 from loading into machines without
  4.         FAST memory. (bug reported by Lewis B. Wetzel.)
  5. 2.      Iconification (Iconification routine by Leo L. Schwab).
  6. 3.      Smaller code (about 15K smaller).
  7. 4.      More variables (26 instead of 4).
  8. 5.      Different syntax for assignment of variables, eg use "X = 2.4" instead
  9.         of "> X".  Also, use the "EXE" gadget instead of the "=" gadget to end
  10.         and evaluate the expression.
  11. 6.      Use pull down menus for selecting options instead of gadgets.
  12. 7.      New functions for the programmer calculator.
  13. 8.      Integers can now be 8, 16, or 32 bits.
  14.  
  15.  
  16.                         *** IMPORTANT ***
  17. This calculator is case sensitive.  All functions must be in lower case,
  18. and all numbers must be in uppser case, including the number PI and E.
  19.  
  20. This is a scientific/programmer/plotter calculator that I wrote in Manx C.
  21. It operates differently from other calculators in that you can see the
  22. expression you are evaluating on the screen.  For example, to evalute 2
  23. plus 21, you can type, from the keyboard,
  24.  
  25.     "2 + 21",
  26.  
  27. and then <RETURN>, and while you are typing, the characters you typed are
  28. echoed to the little window on the calculator.  After you have pressed
  29. <RETURN>, the result of "2 + 21" appears on the calculator window beneath
  30. the line you just typed.
  31.  
  32. You can also enter the above expression by clicking on the gadgets in the
  33. calculator window, except that you click on the "EXE" gadget to get the
  34. result instead of pressing the <RETURN> key.
  35.  
  36. If you made a typo while entering your expression, you can use the
  37. BACKSPACE, DELETE, and the forward and backward arrow keys to correct it,
  38. or the "BS", "<--" and "-->" gadgets.  The calculator will scroll part of
  39. the line you're entering off window if your expression gets too long.  The
  40. maximum number of characters a line can contain is 255.  And finally, you
  41. can recall the last expression you entered by pressing the up arrow, or
  42. clear the expression you're entering by pressing the down arrow, or click
  43. on the "RCL" and "CLR" gadgets.
  44.  
  45. Other useful functions of the calculator include a 26 variable storage
  46. memory.  The variables are A, B, C,...Z.  To store a number, you type from
  47. the keyboard or click on the gadgets:
  48.  
  49.     variable = expression,
  50.  
  51. For example, if you type
  52.  
  53.     A = B + 1,
  54.  
  55. and B equals 1, then A equals 2.
  56.  
  57. Note: The variable Z is always equal to the result of the last
  58. expression.  So if you type
  59.  
  60.     "4 + -2",
  61.  
  62. and <RETURN>, Z becomes 2.  If you then type
  63.  
  64.     "Z + 1",
  65.  
  66. and <RETURN>, you get 3 (and Z becomes 3).
  67. To see what is stored in W, type
  68.  
  69.     "W",
  70.  
  71. and then <RETURN>.
  72.  
  73. NOTE:  In scientific mode, you only have 25 variables, not 26, because E is
  74. a constant and is defined to be 2.718281828.
  75.  
  76. To change from one mode to others, use the "type" menu.  The title bar on
  77. the window will tell you what mode you in.  For example, if you are in the
  78. scientific mode, the title bar will display
  79.  
  80.         Scientific      Rad
  81.  
  82. The "Rad" means that angles are displayed in radian mode.  To toggle
  83. between radian and degree mode, use the "angle" menu.
  84.  
  85. If you are in the programmer mode, the title bar will display
  86.  
  87.         Programmer      Dec     S32
  88.  
  89. The Dec indicates that the calculator displays result in decimal.  To
  90. change to hexidecimal or octal base, use the "int base" menu.  The S
  91. indicates that you are using signed integers.  To change it, use the "int
  92. sign" menu.  The "16" indicates that you are using 32 bit integers.  To
  93. change to 8 or 16 bit integers, use "int size" menu.
  94.  
  95. And finally, in the Plotter mode, the title bar will display
  96.  
  97.         Plotter
  98.  
  99. Also, the title bar will display "Syntax Error" if you've enter a equation
  100. with syntax errors.  And the title bar will display the x and y coordinate
  101. of the graph if you click on the graph or the arrows.  You can make the
  102. title bar display x coordinate alone, y coordinate alone, or both x and y
  103. coordinates by making the appropriate choice in the "display" menu.
  104.  
  105. NOTE:  Always press the RETURN key after you have finished entering the
  106. equation, the xmax, xmin, ymax, or ymin value before clicking on another
  107. gadget. Otherwise, the program will not know that you have entered a new
  108. value or equation and take the appropriate action.
  109.  
  110.  
  111. Here's a list of the math functions supported by the scientific calculator
  112.  
  113.         +       plus
  114.         -       minus or unary minus    eg      12 - 23         = -11
  115.                                         or      12 +-23         = -11
  116.         *       multiply
  117.         /       divide
  118.         sin     sine
  119.         cos     cosine
  120.         tan     tangent
  121.         ln      natural log
  122.         log     log of base 10
  123.         sinh    hyperbolic sine
  124.         cosh    hyperbolic cosine
  125.         tanh    hyperbolic tangent
  126.         ^       power                   eg      2 ^ 3           = 8
  127.         sqrt    square root
  128.         asin    arc sine
  129.         acos    arc cosine
  130.         atan    arc tanget
  131.         exp     exponential function
  132.         e       10 to the power of      eg      2e2             = 200
  133.         csc     cosecant
  134.         sec     secant
  135.         cot     cotangent
  136.         abs     absolute value of
  137.         !       factorial               eg      3!              = 6
  138.  
  139. In addition, PI equals 3.14159 and E equals 2.71828
  140.  
  141.  
  142. Examples of expressions (spaces need not be typed)
  143.  
  144.         "1 + 2.34"      =  3.34
  145.         "2 + -4"        = -2.0
  146.         "6 - 12 / 4"    =  3.0
  147.         "1.2e-1"        = .112
  148.         "(6-12)/4"      = -1.5
  149.         "sin(0)"        =  0.0
  150.         "cos(PI)"       = -1.0
  151.         "2!+3"          =  5.0
  152.         "ln(E^2)"       =  2.0
  153.         "log(1e6)"      =  6.0
  154.         "W"             = whatever is stored in the variable W
  155.         "W + 4"         = the value of variable W plus 4
  156.         "X = W + 4"     = X equals the result of W plus 4
  157.  
  158. Here's a list of the functions supported by the programmer calculator
  159. All calculations can done on 8, 16, or 32 bit integers, sign or unsigned.
  160.  
  161.         +       plus
  162.         -       minus or unary minus    eg      12 - 23         = -11
  163.                                         or      12 +-23         = -11
  164.         *       multiply
  165.         /       divide
  166.         mod     mod                     eg      A mod 3
  167.         >>      shift right             eg      3 >> B
  168.         <<      shift left
  169.         asl     arithmetic shift left   eg      $FF asl 3
  170.         asr     arithmetic shift right
  171.         lsl     logical shift left      eg      \352 lsl C
  172.         lsr     logical shift right
  173.         rol     rotate left             eg      %10010 rol 7
  174.         ror     rotate right
  175.         not     one's complement        eg      not 3
  176.         and     logical and             eg      E and F
  177.         nand    not and
  178.         xor     logical xor
  179.         nxor    not xor
  180.         or      logical or
  181.         nor     not or
  182.  
  183. Precedents of the operators are: (follows the C precedent for operators)
  184.  
  185. Highest
  186.         (       )
  187.  
  188.         not      abs    - (unary minus)
  189.  
  190.         *       /       mod
  191.  
  192.         +       -
  193.  
  194.         <<      >>      asl     asr     lsl     lsr     rol     ror
  195.  
  196.         and     nand
  197.  
  198.         xor     nxor
  199.  
  200.         or      nor
  201.  
  202.         =
  203. Lowest
  204.  
  205. Operators on the same line have the same precedent.
  206.  
  207.  
  208. Also, you can input numbers in hex, octal, decimal, binary or ascii.
  209.  
  210. Hex numbers start with a dollar sign $.                 eg      $0FAC
  211. Octal numbers start with a backslash \.                 eg      \234
  212. Binary numbers start with a percentage sign %.          eg      %101010
  213. ASCII numbers start and end with a single quote '.      eg      'a' or '&'
  214.  
  215. NOTE:
  216.         As in C language,
  217.         >> is a arithmetic shift left if using signed integer.
  218.         >> is a logical shift left if using unsigned integer.
  219.  
  220.  
  221. The rest of the calculator is pretty much self explanatory, so explore and
  222. have fun.
  223.  
  224.  
  225. Finally, I like to thank Leo L. Schwab for putting his iconification
  226. routine in public domain.  I encourage people to use it.  It's great. Here
  227. is the copyright notice at the beginning of his iconify routine.
  228.  
  229. /*  :ts=8 bk=0
  230.  *
  231.  * iconify.c:   You asked for it, you got it.
  232.  *
  233.  * Copyright 1987 by Leo L. Schwab.
  234.  * Permission is hereby granted for use in any and all programs, both
  235.  * Public Domain and commercial in nature, provided this Copyright notice
  236.  * is left intact.  Purveyors of programs, at their option, may wish observe
  237.  * the following conditions (in the spirit of hackerdom):
  238.  *      1: You send me a free, registered copy of the program that uses the
  239.  *         iconify feature,
  240.  *      2: If you're feeling really nice, a mention in the program's
  241.  *         documentation of my name would be neat.
  242.  *
  243.  *                                      8712.10         (415) 456-3960
  244.  */
  245. /*
  246.  
  247.  
  248. That's it.  If you have any questions, comments, bug reports, sent it to
  249.  
  250.     Jimmy Yang
  251.     1115 Lura,
  252.     Pasadena, California, 91106
  253.