Eval evaluates floating point expressions and functions.  It has    p. 1/10
several built in operators and functions, and can take input and
display output in a variety of formats for any number base.

A simple example-- Type:

Ex> x = sin(2.58)*sqrt(10)+_pi*_mu0

The value on the right is computed, printed, and assigned to 'x'.
_pi and _mu0 are two of many pre-assigned constants.  You may use any
previously assigned variable in new expressions.  Variable names are
allowed to be up to 16 characters long.

A single double quote (") refers to the last value displayed.  Example:
Ex> sqrt(2)
1.414213562
Ex> 20*"*"
40

Number bases                                                        p. 2/10
------------
Values can be displayed in any number base from 2 to 36.  You can set
the default input and output bases with the "ibase" and "obase"
commands, respectively.

Exponent representation
-----------------------
If you are working in a base above 14, use a \ instead of an E for
scientific notation.  E.g. If you are working in base 16,
A\10 = hex A times 10^10, where both 10's are in hex.  So the
decimal result would be 10*16^16 = 1.8447e20.

Overriding the default number bases                                 p. 3/10
-----------------------------------
The default input base can be overridden in typical C fashion for hex:
0xffee = hex FFEE.  However a preceding "0" does NOT convert to octal.
See below for converting to octal.  To specify any base as an override,
use \bxxxxx.xxxExxx where b is a single character representing the base
('2'-'9', '0'=10, 'A'-'Z'=11-36), x is a digit in the base, and E (or
"\" for bases greater than 14) is used for scientific notation.
Example:  \2101e101 would be 101e101 base 2, having a decimal equivalent
of 5*2^5=160.  Other special override prefixes:  &h=hex, &b=binary,
&o=octal, &d=decimal, $=hex.
To override the default output base, put any base prefix (e.g. 0x, &h)
with a space after it at the beginning of the expression line.

The "literal variable" character
--------------------------------
If you are working in a default input base where there may be confusion
as to whether an input is a variable or a number, use ! in front of the
input to force the variable value:  E.g. In base 16, A = 10, but
!A = the value of the variable "A".

Special Commands                                                    p. 4/10
----------------
ibase n   Set the default input base.  n ranges from 2 to 36.
obase n   Set the default output base.  n ranges from 2 to 36.
sci       Toggle scientific notation output on/off.
fix       Toggle fixed precision on/off.
dplace n  Set the number of digits after the decimal in fixed
          precision notation.  Ignored in scientific notation.
sigfig n  Set the number of significant figures to be printed.
          Use a value less than 1 for maximum accuracy.
maxexp n  Set the exponent at which output automatically switches
          to scientific notation format.  Use -1 for no limit.
help [n]  Display extended help (starting with page n if specified).
quit      Exit program.

Note:  The argument, n, for the above commands, is always treated as a
       decimal (base 10) number, regardless of the default input base.

Queries (the space after the ? is optional)                         p. 5/10
-------
?       Display brief help.
? ? [n] Display extended help (starting with page n if specified).
? s     Display status (output type, default bases, etc.)
? v     Display a list of all currently assigned variables
? c     Display a list of all pre-assigned constants
? f     Display a short list of available functions
? fl    Display a list of available functions with one line descriptions
? o     Display a list of all operators

Scripts                                                             p. 6/10
-------
Eval can execute script files (files containing a list of Eval commands,
one per line).  This is a good way to repeat similar calculations again
and again.  It can also be used to set up Eval the way you like.

Script commands
---------------
<filename    Run a script file
>filename    Write future commands to a script file
>            End writing to a script file

Script files can also be created or edited using any text editor.

Special Characters (primarily for use in script files)
------------------------------------------------------
;  (comment)   Eval ignores commands that begin with a semi-colon.
@  (be quiet)  Eval will not print any output if you begin a command with @.

The Script Read Path and Write Directory                            p. 7/10
----------------------------------------
You can set the directory to which script files will be automatically
written, and you can specify a path of directories that will automatically
be searched for scripts.

wdir dirname   Eval sets the default writing directory to dirname.
               NOTE:  Be sure to include a slash at the end of the dir name.
Example:  wdir /usr/bin/scripts/  (unix systems)

rpath path     Eval sets the script search path to "path".  NOTE:  Separate
               directories with a ; and end each dir name with a slash.
Example:  rpath /usr/bin/;/usr/bin/scripts/;../scripts/ (unix systems)

Typing wdir or rpath without arguments will clear them.  In reading
scripts, the current directory is not always searched first, but it is
always searched last.  If you desire it to be searched first, explicitly
set it as the first directory in your read path by beginning your read
path with a ;.  If opening a script for writing causes an error, the
write directory is ignored, and an attempt to open the file is repeated.
Type '?s' to see the status of the write directory and read path.

Command line arguments for Eval                                     p. 8/10
-------------------------------
You can specify a calculation for Eval directly on the command
line, and Eval will evaluate it and quit.  Example:

C:\DOS>Eval 4*5 + 22.5   (MS-DOS example)
42.5                     (Note:  Unix may require double quotes around
C:\DOS>                          the expression.)

If your command executes a script, Eval does not quit.  For example:

C:\DOS>Eval "<script.evl"

This executes the commands in the file "script.evl" and continues the
Eval session when they are completed (unless the script ends with a
"quit" command).  Put a @ in front of the < if you do not want the
script commands echoed to the terminal as they are executed.

The quotes around the argument in the previous example are necessary on
many operating systems since the "<" character is otherwise interpreted
as a redirection character by the O/S.

Multiple commands on one line                                      p. 9/10
-----------------------------
The colon can be used to submit multiple expressions on one line like
so (example):

    x=2:y=5:x*y

Eval Startup
------------
The environment variable EVAL_STARTUP will be checked every time
Eval starts.  If this environment variable is a legal file name, that
file will be loaded and run as a script, otherwise this environment
variable will be treated as a sequence of Eval commands (separated
by colons), and those commands will be executed each time Eval is started.
Example (MS-DOS/Win32):

    set EVAL_STARTUP="@maxexp 2:@sigfig 6"

The @ causes the commands to execute quietly.

License Agreement                                                   p. 10/10
-----------------
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or any later
version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
675 Mass Ave, Cambridge, MA 02139, USA.

The author can be contacted at http://willus.com (as of Sept. 2004).
