EQL  :  A user equation library                 Version 3.3  12may96
---

EQL is a user maintainable equation library. It allows you to keep 
track of your functions in a tidy and efficient way, using a full 
screen chooser environment. It is reminiscent of the built in equation 
library in the G/GX, but works on the S/SX too.

EQL lets you:
 - store equations that you use often
 - store text and view in regular or compressed font
 - store pictures
 - run programs 

All this is available from a fast, full screen CHOOSE environment. 
If you want JUST the fast chooser, try out the subset library, 
FCS33.LIB, which is about half the size of EQL33.LIB.  
(An old version of FCS is FCHOOSE.ZIP on Goodies Disk 10)

Matt Willis (mbw8@cornell.edu)
13 May 1996


VERSION
-------
3.0     Faster Scrolling (ml), minor bugfixes
3.1     Supports ram cards as source for EQDIR
3.2     Library put on a diet (lost 400 bytes through rewrites)
	Now "browsing" is better (can enter and exit the eqn viewer)
3.3     Minor bug fixes. Added ability to use AGROB if present. Allows
	6/8 lines of text.

COMPATIBILITY
-------------
   EQL is 99% SysRPL, 1% ML and is compiled for the G/GX. I am not aware 
   of any unsupported entry points that I may have used.

   So it *should* work on an S/SX too. 

TO INSTALL
----------
Library file: EQL33.LIB

Download library file to calculator. Recall the library to the stack. 
Type 0 STO (or another number if you have more ports). Turn calculator off, 
then on. Delete original copy of library (since a copy is now in port 
0). It's installed.

OVERVIEW
--------
The basis of the library is that it looks for functions stored in a 
directory called EQDIR. 

1. From now on, store your equations in a subdirectory called EQDIR. 
Give them creative names, such as 'BatchReactorDesign'. The EQL library
shows the first 20 letters of any name.

2. Run EQLIB, and, assuming the current directory contains the 
subdirectory EQDIR, you'll be given a list of equations to choose from. 

3. When you choose one, you can look at the item (or, if it's a list, 
the items). Press the right and left arrow keys to move forward or 
backward.

4. Press SOLVR to enter the SOLVER, ->STK to put the equation on the 
stack or CANCL to choose another equation.

FAST START: CREATING YOUR OWN EQLIB
-----------------------------------
If you already have a lot of equations, create a subdirectory called EQDIR :
  'EQDIR' CRDIR
and then move your equations into this subdirectory (perhaps using the memory
tool in the G/GX)

For example, your EQDIR directory might contain the following items:
  'Sample1' 
     'x+1=y'
  'Sample2'
     { 'SIN(x)=3' 'COS(y)=2' }
  'Sample3'
     { "Circle formulas" 'x^2+y^2=r^2' 'a=3.14159*r^2' }

Make sure you are in the directory ABOVE the directory EQDIR and then type
  EQLIB

You'll see a list of three items. 

	****** MYDIR EQUATIONS (3) ******
	> Sample1
	  Sample2
	  Sample3

	[6/8][   ][   ][   ][Cancl][ OK ]

Press ENTER or OK to examine one. If you have EQSTK or JAVA, formulas 
will appear pretty-printed; otherwise they'll just be text formulas. 
Use the arrow keys to examine all the pages in a particular formula.

I suggest you have the following items in your custom menu in the directory
above EQDIR:
  'CST' 
    { { "SOLVR" << 30 MENU >> } EQ EQLIB }

For more ideas, check out the tips section at the end of this document.

FEATURES
--------
From now on, you should try to put your equations in lists. You don't 
have to, but if you do, you can take advantage of some of the neater 
features of EQLIB.

You can put help text into lists, alongside equations. You don't even 
need to put any equations at all. (You can make a multi-page help file 
this way.) You can also put GROBS in a list. That means you can have a 
lot of supporting material along with an equation.

If you put a program in EQDIR, it will be executed, unless it is an 
algebraic like << -> a << a 1 + >> >>. So if you've created programs 
that don't need anything from the stack, you can easily put them in 
EQDIR as well.

Generally, when you select an object this is what happens...

  selected object    action
  ---------------    -------------------
  grob|text          view item, then quit
  {list}             view items in list (AGROB if avail), put on stack or
		     enter the solver
  'equation'         view item (AGROB if avail), then quit or enter solver
  Mpar library data  Store in Mpar, then execute MSOLVR
  <<program>>        Execute, or if algebraic, view.
  other              view item, then quit
  

NEW COMMANDS
------------
The following is a list of new commands your HP will have. Unless you 
like to program, all you'll need will be the EQLIB command. If you 
don't understand what all these commands are for, don't fret.

ABOUT   (->)  
	"About" information for this library

FCHOOSE ($ {list} number -> object 1 | 0)
	A full screen replacement for the G/GX CHOOSE command. 
	Same syntax. Should work on an S/SX!

TITLE   ($ ->)
	Show a nice title (centered) on the top of the screen.
	Mimics #E0044h LIBEVAL on the G/GX.

EQLIB   (->)
	Start the equation library. (Main command)

PCHOOSE ($ {list}-> number 1 | 0)
	Similar to the CHOOSE command, except it goes full page by full 
	page.

TITLE2  ($ $ ->)
	Show a nice title (left and right justified) on top of screen.


Some examples follow in the next section, "Tips and Tricks"

TIPS AND TRICKS
---------------
1) Making EQLIB easy to get at

Create a custom menu. I swear by them. Every working directory I use 
has a custom menu. When you're in the directory ABOVE EQDIR, type in 
the following:
      { EQLIB EQ { "SOLVR" << 30 MENU >> } {} {} EQDIR } MENU

This creates a variable CST which you can see if you press the CST key!

2) Using the built-in MES solver:

By default, the EQLIB uses the regular solver. 

To use the built in MES solver you can create an Mpar variable and then 
save it under a different name in EQDIR. Or, you can use a program to 
set up the multiple equation solver, like: 

<< { 'X=r*COS(theta)' 'Y=r*SIN(theta)' }                                        
    STEQ                                                                        
    MINIT                                                                       
   "CIRCLE STUFF"                                                               
    { X Y "" r theta }                                                          
    MITM                                                                        
    MSOLVR                                                                      
>>

Note that this approach can let you store values in variables as well. 
I personally do not like "pre-seeding" variables, but you are welcome 
to do so. When this program is executed, it will be in the directory 
_ABOVE_ EQDIR.


3) Making a help file (with pages of text, but no equations)

I don't think you should be cheating on exams with your HP. It's more 
of a common sense thing, as far as I am concerned. But you can create 
pages and pages of text, and display it in a really crammed in format. 
You'll have to tell the program where the newlines go, but that's easy 
enough.

e.g. Normal font: (selected when your text has < 6 lines )
'HELPTEXT'
{ 
"This is a page
of regular text"
"This is the
second page of
regular text"
}


e.g. Condensed font: (selected when your text has more than 6 lines)
{
"This is a page of crammed
text and you can fit a lot
of text on one screen. Just
remember that you have to 
put at least 7 or 8 lines of
text for EQLIB to know that
you want condensed text."
"This is big font"
}


4) Using a descriptive name

You can create "illegal" names for your EQDIR that include spaces and 
other characters by using a SYSEVAL, ($>ID). This syseval is supported 
so it should work equally well on an S/SX and G/GX.

Example:
   { object }
   "Illegal Name" #05B15h SYSEVAL STO

WARNING: Type this in wrong and your memory can be erased!!

To erase something with an "illegal" name, go through the above 
procedure again:
   "Illegal Name" #05B15h SYSEVAL PURGE

Here's a handy (safe, too) program to type in to automate this task:

'STR->ID'
 << ->STR #05B15h SYSEVAL >>


5) Including help information with your equations

Create a list with your equations in it. As an item in the list, 
include a multi-line string that explains a little about the funtions.

e.g. 

{
"CIRCLE FORMULAE
Cartesian space
r=radius"
'x^2+y^2=r^2'
}

When you enter the solver, the only thing left is the equation 
  'x^2+y^2=r^2'
That is, defore you enter the SOLVER, the text will be stripped out. 
Same goes for GROBS. If you create a pretty graphic, put it in the list. 



6) Using the other commands in the library

I included them because I thought maybe 5% of the users might like 
them. Don't worry about them if you can't see what they're for. You can 
safely ignore them. 

The TITLE and TITLE2 routines put pretty titles on the top of the 
screen:

<< CLLCD "HELLO WORLD" TITLE 1 FREEZE >>
<< CLLCD "HELLO" "WORLD" TITLE2 1 FREEZE >>

The ABOUT command tells you about the software version.

The FCHOOSE command replaces the CHOOSE command in the G/GX. The syntax 
is identical to that found in the Advanced User's Reference. Try the 
following:

<< "TITLE" 
  { "ITEM 1" 
    { "ITEM 2" "SURPRISE"}
    3.14159
  }
  1     @ start row for menu bar
  IF FCHOOSE THEN 1 DISP 1 FREEZE END
>>


7) How to store your equation library on a memory card:

Once you have a directory up and running (and are unlikely to be making
changes on a daily basis) you can store it in a port. This frees up some
of your HP's main memory. Tell EQL where to find the directory by 
putting the name of the port object in a list, and storing this in the 
variable EQDIR. The whole process might go like this:

  'EQDIR' RCL
  :1:'SampEqns' STO
  'EQDIR' PGDIR
  { :1:'SampEqns' } 'EQDIR' STO
