1 /********************************************************************************
2 *                                                                               *
3 *                      O n - L i n e   H e l p   T e x t                        *
4 *                                                                               *
5 *********************************************************************************
6 * Copyright (C) 2001,2002 by Jeroen van der Zijp.   All Rights Reserved.        *
7 *********************************************************************************
8 * This program is free software; you can redistribute it and/or modify          *
9 * it under the terms of the GNU General Public License as published by          *
10 * the Free Software Foundation; either version 2 of the License, or             *
11 * (at your option) any later version.                                           *
12 *                                                                               *
13 * This program is distributed in the hope that it will be useful,               *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                 *
16 * GNU General Public License for more details.                                  *
17 *                                                                               *
18 * You should have received a copy of the GNU General Public License             *
19 * along with this program; if not, write to the Free Software                   *
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.    *
21 *********************************************************************************
22 * $Id: help.cpp,v 1.5 2002/05/23 15:48:18 fox Exp $                          *
23 ********************************************************************************/
24 #include "fx.h"
25 #include "Calculator.h"
26 
27 
28 // Help text
29 const char Calculator::help[]=
30 "\n\n"
31 "                                       The FOX Calculator\n"
32 "\n\n"
33 "Introduction.\n"
34 "\n"
35 "The FOX Calculator is a simple desktop calculator geared toward the programmer.  "
36 "It supports not only a full complement scientific functions, but also common "
37 "operations that programmers need, such as bitwise operations, bitwise shifting, "
38 "and base-2 logarithm and exponents, and numeric conversion between hexadecimal, "
39 "octal, binary, and decimal.\n"
40 "The FOX Calculator implements correct operator precedences, so expressions like "
41 "2+3*5 yield the correct result, which is 17, and not 25.\n"
42 "Also featured is a constant memory, which permanently stores its value even if "
43 "you exit the calculator and restart it later.\n"
44 "\n\n"
45 "Configuration.\n"
46 "\n"
47 "Pressing on the calculator icon brings up the Calculator Preferences dialog.  "
48 "The Calculator Preferences dialog comprises three settings:\n\n"
49 "\t\t- Settings for the calculator itself;\n"
50 "\t\t- Color settings of the button groups;\n"
51 "\t\t- Information about the calculator.\n"
52 "\n"
53 "In the Calculator settings panel, you can change font used for the "
54 "display, by pressing the \"Set...\" button to bring up the standard Font Selection "
55 "Dialog.\n"
56 "You can change the way numbers are printed as well.  Checking \"Always show exponent\" "
57 "will cause the calculator display always to display the number in exponential notation.  "
58 "Checking \"Never show exponent\" will cause the calculator to render the number in simple "
59 "dot notation.\n"
60 "The precision can be set by means of the spin button; the default precision is set to 16.\n"
61 "Finally, the calculator can be set to beep when errors occur.\n"
62 "\n"
63 "In the Color settings panel, you can change the colors of the various button groups.\n"
64 "The buttons are grouped by function; the numbers are in one group, and the operators are "
65 "in another, and so on.\n"
66 "\n"
67 "In the About panel, some information is presented about the calculator, like version "
68 "number and author's contact.\n"
69 "\n\n"
70 "Entering Numbers.\n"
71 "\n"
72 "You can enter a number by clicking on the digit buttons, or simply hit the right "
73 "digit on the keyboard.  Numbers in exponential notation are entered by entering the "
74 "mantissa first, then hitting the \"EXP\" button, and then entering the exponent. "
75 "Up to 3 digits may be entered for the exponent; entering more than 3 will cause the "
76 "digits to shift, i.e. the first digit entered will be dropped and replaced by the "
77 "second, the second digit will be replaced by the third, and the third will be replaced "
78 "by the new input.\n"
79 "Changing the sign of the exponent is accomplished by hittin the \"+/-\" button.\n"
80 "At any time, you can hit the Backspace key to delete the last digit entered.\n"
81 "Two numbers, pi and e (euler's number) may be entered with a single button:\n"
82 "\n"
83 "\tpi\tEnters the number 3.1415926535897932384626433833\n"
84 "\te\tEnters the number 2.7182818284590452353602874713 (hit the \"inv\" button first)\n"
85 "\tphi\tEnters the golden ratio number 1.6180339887498948482045868343 (hit the \"hyp\" button first)\n"
86 "\t1/phi\tEnters the inverse golden ratio number (hit the \"hyp\" and \"inv\" buttons)\n"
87 "\n\n"
88 "Operators.\n"
89 "\n"
90 "The operators in the FOX Calculator are the usual suspects:\n"
91 "\n"
92 "\t+\tAddition\n"
93 "\t-\tSubstraction\n"
94 "\t*\tMultiplication\n"
95 "\t/\tFloating point division\n"
96 "\n"
97 "In addition, FOX Calculator also includes bitwise operators, such as:\n"
98 "\n"
99 "\tAND\tBit-wise logical and\n"
100 "\tOR\tBit-wise logical or\n"
101 "\tXOR\tBit-wise logical exclusive or\n"
102 "\tNOT\tBit-wise logical not\n"
103 "\tSHL\tBit-wise shift left\n"
104 "\tSHR\tBit-wise shift right\n"
105 "\tSAR\tBit-wise signed shift right (hit the \"inv\" button first)\n"
106 "\n"
107 "Also nice for programmers is the inclusion of integer operations:\n"
108 "\n"
109 "\tmod\tInteger modulo\n"
110 "\tdiv\tInteger division (hit the \"inv\" button first)\n"
111 "\n"
112 "All the operators have certain precedence relations with each other, so that "
113 "an expression is evaluated correctly.\n"
114 "\n\n"
115 "Trigonometric Functions.\n"
116 "\n"
117 "The Calculator incorporates the usual trigonometric functions:\n"
118 "\n"
119 "\tsin    \tSine\n"
120 "\tcos    \tCosine\n"
121 "\ttan    \tTangent\n"
122 "\tasin  \tInverse sine or arc sine (hit the \"inv\" button first)\n"
123 "\tacos  \tInverse cosine\n"
124 "\tatan  \tInverse tangent\n"
125 "\tsinh  \tHyperbolic sine (hit the \"hyp\" button first)\n"
126 "\tcosh  \tHyperbolic cosine\n"
127 "\ttanh  \tHyperbolic tangent\n"
128 "\tasinh \tInverse hyperbolic sine (hit the \"hyp\" and \"inv\"buttons first)\n"
129 "\tacosh \tInverse hyperbolic cosine\n"
130 "\tatanh \tInverse hyperbolic tangent\n"
131 "\n"
132 "For the first 6 functions, the angle mode determines whether the argument is "
133 "specified in terms of degrees, radians, or grad.  "
134 "Note that the angle mode is preserved across invocations of the Calculator.\n"
135 "\n\n"
136 "Other Functions.\n"
137 "\n"
138 "Other functions supported by the calculator are the following:\n"
139 "\n"
140 "\tlog     \tBase 10 logarithm\n"
141 "\tln      \tNatural logarithm\n"
142 "\t2log    \tBase 2 logarithm\n"
143 "\tx!      \tFactorial\n"
144 "\tnPr     \tPermutations\n"
145 "\tnCr     \tCombinations\n"
146 "\tsqrt    \tSquare root\n"
147 "\tx^y     \tX raised to the power y\n"
148 "\t1/x     \tReciprocal\n"
149 "\t10^x    \tBase 10 exponentiation (hit the \"inv\" button first)\n"
150 "\te^x     \tExponentiation\n"
151 "\t2^x     \tBase 2 exponentiation\n"
152 "\tx^1/y \tX raised to the power 1/y\n"
153 "\tx^2     \tX squared\n"
154 "\n\n"
155 "Limits.\n"
156 "\n"
157 "The calculator works in IEEE 746 double precision mode; for bit-wise operations, "
158 "it uses 32 bit integers.  Thus, the numeric limits are as follows: \n"
159 "\n"
160 "Smallest real number:\t2.2250738585072010e-308\n"
161 "Largest real number:  \t1.7976931348623158e+308\n"
162 "Smallest integer number:\t0\n"
163 "Largest integer number:\t4294967295\n"
164 ;
165