home *** CD-ROM | disk | FTP | other *** search
- <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
- <html>
-
- <head>
- <meta http-equiv="refer" content="file:coolcalc.htc">
-
-
-
- <title>Function Reference</title>
- </head>
-
- <body bgcolor="#FFFFFF">
-
- <h2>Function Reference</h2>
-
- <p>The following sections are in this document:</p>
-
- <dl>
- <dt>_functions (underbar functions) vs. functions</dt>
- <dt>Calculator Function List</dt>
- <dt>Layout Function List</dt>
- </dl>
-
- <h3>_functions (underbar functions) vs. functions</h3>
-
- <blockquote>
- <p>CoolCalc's function set is divided into two types of
- functions: calculator functions, and layout functions. Two
- distinguish between the two, layout functions always start
- with the underbar character: "_". Also, note that
- the calculator can function in two modes: RPN, or non-RPN.
- Some functions won't work in certain modes; for example, the
- Enter function is meaningless in non-RPN mode, and the Equals
- function is meaningless in RPN mode.</p>
- <p>When you look at a macro via the macro editor, you'll see
- something after each function name. These are parameters, and
- all functions can take a single parameter, although not all
- of them use one. Parameters are always text strings. If you
- look at a macro file in the macro editor, you will see
- functions like <strong>_AddDisplay:"1"</strong>.
- The "1" is the parameter to the AddDisplay
- function, and this function adds the digit one to the
- display.</p>
- <p>Another important point: not all layout functions are
- assignable to buttons. The ones that aren't assignable will
- not appear in the list of functions when you request the
- button properties. For example, you cannot have a button that
- changes the typeface of the small font. However, if you look
- at the layout macros, you will see some of these functions.</p>
- </blockquote>
-
- <h3>Calculator Function List</h3>
-
- <blockquote>
- <p><strong>Absolute value:</strong> Make the value in the
- display positive.</p>
- <p><strong>Arc Cosine: </strong>Calculate the arc-cosine of
- the display (in degrees).</p>
- <p><strong>Arc Sine: </strong>Calculate the arc-sine of the
- display (in degrees).</p>
- <p><strong>Arc Tangent: </strong>Calculate the arc-tangent of
- the display (in degrees).</p>
- <p><strong>Change Sign:</strong> Changes the value in the
- display from positive to negative, or negative to positive.</p>
- <p><strong>ClearStack: </strong>Clears all values previously
- saved by pressing the Enter key (RPN mode), or by pressing
- the left parenthesis key (non-RPN mode). Use this in
- combination with the _Clear function to reset the calculator.
- </p>
- <p><strong>Cosine: </strong>Calculate the cosine of the
- display (in degrees).</p>
- <p><strong>Divide: </strong>Divides the last two values.</p>
- <p><strong>E to the x: </strong>Calculate e to the power
- shown in the display.</p>
- <p><strong>Enter: </strong>Pushes the value in the display
- onto the stack (RPN mode only).</p>
- <p><strong>Equals:</strong> Finishes the calculation (non-RPN
- mode, only).</p>
- <p><strong>Factorial: </strong>Calculates the factorial (n!)
- of the value in the display. </p>
- <p><strong>Fractional Part: </strong>Changes the display to
- show only the fractional part. For example, 97.432 becomes
- 0.432.</p>
- <p><strong>Hyperbolic Cosine: </strong>Calculate the
- hyperbolic cosine of the display (in degrees).</p>
- <p><strong>Hyperbolic Sine:</strong> Calculate the hyperbolic
- sine of the display (in degrees).</p>
- <p><strong>Hyperbolic Tangent: </strong>Calculate the
- hyperbolic tangent of the display (in degrees).</p>
- <p><strong>Integer part:</strong> Changes the display to show
- only the integer part. For example, 97.432 becomes 97.</p>
- <p><strong>Left Parenthesis: </strong>Used to do complicated
- calculations in non-RPN mode. This has the same effect as a
- "(" would in a formula.</p>
- <p><strong>Log base 10:</strong> Calculate the logarithm of
- the display.</p>
- <p><strong>Minus:</strong> Subtraction.</p>
- <p><strong>Multiply:</strong> Multiplication.</p>
- <p><strong>Natural Logarithm: </strong>Calculate the log to
- the base of e using the value in the display.</p>
- <p><strong>Percent: </strong>Percentage function. This mimics
- the percent function of standard calculators. For example, to
- figure out the total bill including the tip for a restaurant
- bill of $70, you could do: 70 + 15 % =</p>
- <p><strong>Plus:</strong> Addition</p>
- <p><strong>Reciprocal: </strong>Takes the reciprocal of the
- value in the display. (One divided by the value in the
- display).</p>
- <p><strong>Right Parenthesis:</strong> Ends a calculation
- started by a Left Parenthesis. This works only in non-RPN
- mode, and has the same effect as a ")" would in a
- formula.</p>
- <p><strong>RPN Mode:</strong> Turns RPN mode on or off. This
- function requires a parameter of "On" to turn RPN
- mode on, and a parameter of "Off" to turn RPN mode
- off. The parameter is case sensitive.</p>
- <p><strong>Sine:</strong> Calculate the sine of the display
- (in degrees).</p>
- <p><strong>Square:</strong> Squares the display; i.e.
- multiplies the value in the display by itself.</p>
- <p><strong>Square root: </strong>Takes the square root of the
- value in the display.</p>
- <p><strong>Swap last 2 values:</strong> RPN mode only.
- Switches the last value pushed onto the stack via the Enter
- function with the value currently in the display.</p>
- <p><strong>Tangent: </strong>Calculate the tangent of the
- display (in degrees).</p>
- <p><strong>Y to the x: </strong>The first value entered is
- raised to the power of the value in the display.</p>
- <p><br>
- </p>
- </blockquote>
-
- <h3>Layout Function List</h3>
-
- <blockquote>
- <p><strong>(blank): </strong>This does nothing. Blank buttons
- needed to be assigned to some function. (Note that the name
- of this function starts with a space character. This insures
- it is the first function to appear in the list).</p>
- <p><strong>_AddButton:</strong> (Layout only) Starts the
- definition of a new button. The button won't be created until
- the left, right, top and bottom points of the button are
- specified via the _SetButtonLeft, _SetButtonRight,
- _SetButtonTop, and _SetButtonBottom functions are called.</p>
- <p><strong>_AddDisplay: </strong>Adds the parameter text to
- the display.</p>
- <p><strong>_Backspace: </strong>Erases the last character
- entered via _AddDisplay from the display.</p>
- <p><strong>_Clear: </strong>Clears the display.</p>
- <p><strong>_Display: </strong>This doesn't do anything in
- itself, but any button that has the _Display function
- assigned to it will show the value in the display. Note that
- the button format should be Real Number.</p>
- <p><strong>_EnterText:</strong> Clears the display, then
- enters the parameter into the display. This is useful for
- setting up constants such as pi or e.</p>
- <p><strong>_EraseVariables:</strong> Erases all variables.</p>
- <p><strong>_Help: </strong>Launches help. The help file to be
- launched is the parameter.</p>
- <p><strong>_Label: </strong>(Layout Only) This does nothing,
- but a button assigned to the _Label function will display the
- parameter, but won't have the grey background and border
- normally associated with a button.</p>
- <p><strong>_ModifyLargeFont:</strong> (Layouts only). The
- ensuing font functions will relate to the Large Font.</p>
- <p><strong>_ModifyMediumFont: </strong>(Layouts only). The
- ensuing font functions will relate to the Medium Font</p>
- <p><strong>_ModifySmallFont: </strong>(Layouts only). The
- ensuing font functions will relate to the Small Font</p>
- <p><strong>_PlayMacro: </strong>The macro specified in the
- parameter is played. This can be a new layout, or any other
- type of macro.</p>
- <p><strong>_Precision: </strong>The parameter value is used
- to set the precision for real number display.</p>
- <p><strong>_ResetButtons: </strong>(Layout only). This erases
- all buttons from the screen. Macros that launch a new layout
- MUST call this function before any new buttons are defined.</p>
- <p><strong>_SetButtonAlignment: </strong>(Layout only). The
- parameter is the alignment ("Left",
- "Center", or "Right") for the new button
- we're defining. This must be preceded by the _AddButton
- function.</p>
- <p><strong>_SetButtonBottom: </strong>(Layout only). Sets the
- bottom coordinate for the button currently being added.</p>
- <p><strong>_SetButtonFont: </strong>(Layout only). The
- parameter dictates the font to assign to the button currently
- being added. The parameter can be "0" for Small,
- "1" for Medium or "2" for Large.</p>
- <p><strong>_SetButtonFormat:</strong> (Layout only). The
- parameter dictates the format to assign to the button
- currently being added. The parameter can be "0" for
- money, "1" for a non-integer number, "2"
- for text, "3" for an integer, and "4" for
- a bitmap file.</p>
- <p><strong>_SetButtonFunction: </strong>(Layout only). The
- parameter has the name of the function to assign to the
- button currently being added.</p>
- <p><strong>_SetButtonKey: </strong>(Layout only). The
- parameter is the keyboard equivalent for the button. You can
- see a list of legal keystrokes from the button properties
- menu (Go into Program Mode, then hold down Alt and select a
- button).</p>
- <p><strong>_SetButtonKeycap: </strong>(Layout only). The
- parameter has the text for the button display for the button
- currently being added.</p>
- <p><strong>_SetButtonLeft: </strong>(Layout only). Sets the
- left coordinate for the button currently being added.</p>
- <p><strong>_SetButtonParameter: </strong>(Layout only). The
- parameter has the text of the parameter to assign to the
- button currently being added.</p>
- <p><strong>_SetButtonRight: </strong>(Layout only). Sets the
- right coordinate for the button currently being added.</p>
- <p><strong>_SetButtonTop: </strong>(Layout only). Sets the
- top coordinate for the button currently being added.</p>
- <p><strong>_SetDefaultButtonHeight: </strong>(Layout only)
- New buttons get the value of the parameter as their height.</p>
- <p><strong>_SetDefaultButtonWidth: </strong>(Layout only) New
- buttons get the value of the parameter as their width.</p>
- <p><strong>_SetDisplayHeight: </strong>(Layout only) The
- height of the screen in which this layout was created. This
- is used so that if the layout is displayed on another device
- with a different screen size, the layout will scale properly.</p>
- <p><strong>_SetDisplayWidth: </strong>(Layout only) The width
- of the screen in which this layout was created. This is used
- so that if the layout is displayed on another device with a
- different screen size, the layout will scale properly.</p>
- <p><strong>_SetFontBold: </strong>(Layout only) The boldness
- of the font being defined is set. A parameter of
- "0" means non-bold, "1" means bold. (See
- also _ModifySmallFont, _ModifyMediumFont or _ModifyLargeFont)</p>
- <p><strong>_SetFontFace: </strong>(Layout only) The typeface
- of the font being defined is set. The parameter has the name
- of the typeface. (See also _ModifySmallFont,
- _ModifyMediumFont or _ModifyLargeFont)</p>
- <p><strong>_SetFontItalic: </strong>(Layout only) The italics
- of the font being defined is set. A parameter of
- "0" means non-italic, "1" means italic.
- (See also _ModifySmallFont, _ModifyMediumFont or
- _ModifyLargeFont)</p>
- <p><strong>_SetFontSize: </strong>(Layout only) The size of
- the font being defined is set. The parameter is the size is
- in points. (See also _ModifySmallFont, _ModifyMediumFont or
- _ModifyLargeFont). </p>
- <p><strong>_SetFunctionLibrary: </strong>(Layout only) Assign
- a function library to the current layout. This MUST be a part
- of every layout macro. For CoolCalc, the function library is
- always "coolcalc.dll"</p>
- <p><strong>_SetRegistryVariable: </strong>The parameter
- contains the name of a registry variable to be assigned to
- the value of the display. Registry variables are stored in
- the system registry, and hence, are permanently saved, even
- when the CoolCalc program is terminated. </p>
- <p><strong>_SetStatus: </strong>The parameter holds the text
- to be displayed in the status display.</p>
- <p><strong>_SetTitle: </strong>(Layout only) Sets the title
- of the current layout to the parameter string.</p>
- <p><strong>_SetVariable: </strong>The parameter contains the
- name of a variable to be assigned to the value of the
- display.</p>
- <p><strong>_ShowRegistryVariable: </strong>A button with this
- function assigned to it displays the value of the registry
- variable named in the parameter. Make sure to set the format
- of the button properly when using this function; for example,
- a numeric variable should have type Real Number. </p>
- <p><strong>_ShowStatus: </strong>A button with this function
- assigned to it displays the value of the current status
- string. The status string is set with the _SetStatus
- function, but may change depending upon whether Program Mode
- is active, or if a macro is being recorded. The status button
- is usually placed alongside the top menu bar.</p>
- <p><strong>_ShowVariable: </strong>A button with this
- function assigned to it displays the value of the variable
- named in the parameter. Make sure to set the format of the
- button properly when using this function.</p>
- <p> </p>
- </blockquote>
- </body>
- </html