Secant v1.02 Copyright 1992 Justin Miller, P.O. Box 17, Imbler, OR 97841 Permission is herewith granted to freely distribute and use Secant v1.02, providing that: 1) This documentation file and copyright notice are included 1) Any charge made for it is not in excess of double what DevWare, Inc. of Poway, California, USA is currently charging. All other rights reserved If you find this program particularly useful, small contributions ($5) are always appreciated. Requires: Workbench v1.2 or higher No special memory requirements Secant is a scientific calculator for the Amiga designed to take advantage of the new capabilities afforded by Release 2 and higher of the system software. To load Secant, double click on its icon. If you wish to have it automatically loaded every time you boot, under Release 2 you may drop it in your WBStartup Drawer. On a 1.3 machine, by default, Secant will open an iconified (small) window labeled Secant. To enlarge this window at any time simply click on it, and then click the menu button, or press any key. On a Release 2 machine, Secant, by default, will open hidden, that is without a window. There are a variety of ways to tell it that you want it to appear, however. The first of these is through the Workbench Tools menu. Simply select any Workbench window, hold down the menu button, and select Tools | Secant. Secant also attaches itself to a Hotkey. By default this hotkey is left Amiga c. Any time you need Secant to appear, you may type this key sequence. Once you have Secant zoomed (open with a full sized window), you are ready to enter your math problems. You may either type in the numbers and operators, or select their gadgets. On gadgets with a multiple character label ("Sin(" as opposed to "1"), one letter on the gadget is underlined. This is its keyboard command. As you type in these numbers and operators, they will appear in the string gadget at the top of the window. Your may delete the last character in the string Gadget by pressing backspace. If at any time you need to perform more complex editing operations (cursoring five spaces to the left to insert something, for instance), you can click in the string gadget, or press the space bar. A cursor will appear, letting you edit the expression as normal. Note that clicking on the gadgets will insert their values at the current cursor position. You could, therefore, cursor over five spaces, and the click the "Sin(" gadget to insert "Sin(" at that point. The next gadget you clicked would then putƒ9!)!?‡ÿÙ™™™™ÿƒ™™ƒ™™ƒÿáÏŸŸŸÏáÿ‡“™™™“‡ÿŸŸ‡ŸŸÿŸŸ‡ŸŸŸÿÙŸ‘™™Áÿ™™™™™™ÿters to the right of "Sin(" farther to the right to make room. When you have entered the complete expression, click on the enter gadget or press return, or enter. (Note that if your cursor was showing in the string gadget, you will have to press the enter key twice). There are two special function gadgets. The Alt gadget changes all the trig and log functions to their inverses. Note that inverse sine is labeled "ASin(", inverse cosine is labeled "ACos(" and so on. The second special purpose gadget is labeled "DGR". Clicking this gadget will cause its face to change to "RAD". This denotes whether the trig functions work in degrees or radians respectively. Roots are taken using the "R" operator. "2R4" is read, "square root of 4" and evaluates to 2. To raise numbers to powers use the "^" operator. "2^2" is read "two squared" and evaluates to four. The calculator observes the order of operations. This means that unless otherwise specified by parentheses, powers and roots will be taken first, multiplication and division done next, and addition and subtraction done last. At the bottom of the Secant calculator are several control gadgets. Icon tells Secant to make itself into an icon. It will close its large window and open a small one that has just enough room for the window title. To tell it to enlarge itself again, click on the window's title bar, and then press the right mouse button (menu button). If you are running Secant on a Release 2 machine, you could also select it from the Tools menu or type its hotkey (normally left Amiga c). Another control gadget is labeled hide. On a 1.2 or 1.3 machine, this will have the same effect as the Icon gadget. On a Release 2 machine, this will cause Secant to close its window entirely. To tell it to open its window you must type its hotkey or select it from the Workbench Tools menu. The Remove gadget tells Secant to remove itself from memory. When you click on this gadget, Secant will remove its name from the Tools menu, disable its hotkey, and free all of the memory that it was using. The Settings gadget brings up a settings requester. Here you can describe how you would like Secant to behave. On a 1.2 or 1.3 machine, you have few options. You can tell Secant to either open Iconified, or Zoomed, and to either Iconify or Remove itself when you click on its window's close gadget. If you have ARexx installed, you can also specify its ARexx port name (note that this is automatically converted to uppercase). On a Release 2 machine, your options are more plentiful. You can tell Secant what public screen you would like it to open on by default, what its hotkey should be (see the system software manual for a directions on hotkey descriptions), and what priority its hotkey should have (this come into play only if another application has a conflicting hotkey). You can also specify that it is to open hidden, or hide upon closure of its window. When you are done you may click Use to use your settings, Save to save and use your settings, or Cancel to abort. Secant recognizes the following options. They may be specified either on the command line, if you are loading it in a script (like your startup-sequence) or from a shell, or they may be specified as Tool Types if you are loading it from the Workbench (You can set Tool Types using Workbenches Icon Information menu item). If you are passing them as command line arguments (through a script or the shell) enclose each set in quotes like this: Secant "CX_POPUP=YES" "COORDS=135,20" CLOSE=HIDE or ICON or REMOVE COORDS=, ICONCOORDS=, CX_POPKEY= CX_POPUP=YES or NO or HIDE or ICON CX_PRIORITY= PORTNAME= PUBSCREEN= TOOLSMENU=ON or OFF Secant is equipped with an ARexx port. This means that you can tell it to open itself on a given public screen (like your word processor's) via an ARexx macro (your word processor would have to open a public screen and support ARexx). By default, SuperCalc's ARexx port name is "SECANT". You can of course change this to anything you like, but again, note that it will always be converted to uppercase. Secant will accept the following ARexx commands. ACTIVATE Same as POPUP. ACTIVATEWINDOW If Secant has a window open, it will activate it (make it the currently selected window). HIDE Instructs Secant to hide. ICONIFY or ICON Instructs Secant to iconify itself. POPKEY Tells Secant to set its Hotkey to the key sequence specified in the description. Hotkey description is a required argument. POPUP [Public Screen Name] [COORDS ] Tells Secant to appear. Public Screen Name and COORDS are optional. If a Public Screen Name is specified Secant will attempt to open on the given screen. If it cannot, it will open on the default public screen (usually the Workbench screen). If the keyword COORDS is found, two numbers are expected to immediately follow. The X and Y coordinates of the window will be set to these. If both a public screen and coordinates are specified they must be in the above order. If coordinates are given, the keyword COORDS cannot be omitted. WINDOWTOBACK If Secant has a window open, it will send it to the back. Otherwise this command is ignored. WINDOWTOFRONT If Secant has a window open, it will bring it to the front. Otherwise this command is ignored.