!
! This file is digested by the VAX-11 LIBRARIAN to create a HELP library
!  for the CALC program
!
1 HELP
This program acts as a sophisticated calculator.  It can perform
integer and 32-bit floating point arithmetic using a standard FORTRAN
assignment statement syntax.  Scalar variables may be assigned values
in one statement and then used on the right-hand side of another
statement.  An internal symbol table contains the current values and
types of each scalar variable.  Commands are available to save and
load the internal symbol table into/from a file, to list the contents
of the symbol table, and to delete symbols from the symbol table.  If
a symbol table file named CALCINI.DAT exists in the default directory
or if the logical name, CALCINI, points to a valid symbol table file,
then that file is automatically loaded when CALC is initiated. 
!
!               description of assignment statement
!
1 ASSIGNMENT 
The syntax of an assignment statement is:

        [variable=]expression
where:
        variable    is an optional FORTRAN variable name 
        expression  is a FORTRAN-type expression made up of:
                    VALUES:  integer numbers, real numbers, variables
                    OPERATORS: +,-,*,/,**
                    PARENTHESES:  (,)
                    INTRINSIC FUNCTIONS:  ABS, ACOS, ACOSD, ALOG, ALOG10,
                        ASIN, ASIND, ATAN, ATAND, COS, COSD, EXP, INT,
                        LOG, LOG10,NINT,REAL, SIN, SIND, SQRT, TAN, TAND
The expression is evaluated, displayed, and, if a variable is specified,
assigned to the specified variable.  The variable takes the type of the 
expression.
!
2 VALUES
Values may be integer numbers, real numbers, or variables:

    integer number      a standard FORTRAN INTEGER number in decimal, octal,
                        or hexadecimal format. A number which will not fit
                        in a 32-bit word is considered a syntax error.
                        Examples:  +200, -5, 0,  1024, '737'O, '8EF'X

    real number         a standard FORTAN REAL number (only 'E'-type
                        exponents allowed)  with the following syntax:
                                [+/-] [digits] . [digits] [E [+/-] digits]
                        If the exponent is too large, then the  error 
                        '**ERROR IN REAL NUMBER: ' is displayed.
                        Examples:   +1.,  1.0, -.5, .314E+1

    variable            a legal FORTRAN variable name which has been 
                        defined by a symbol table file or by use on the
                        left-hand side of a previous CALC statement.
!
2 OPERATORS
The following operators are implemented.  They have the usual FORTRAN
meaning. If either of the operands is of type REAL, then the operation is
performed using REAL arithmetic. 

        -               unary negation, subtraction
        +               unary identity, addition
        *               multiplication
        /               division
        **              exponentiation

The standard FORTRAN precedence rules are followed:  unary operations and
intrinsic functions have the highest precedence, exponentiation is
performed next, then multiplication and division, and finally addition and
subtraction. Parentheses may be used to alter the order of expression
evaluation. 
!
2 INTRINSIC_FUNCTIONS
The following intrinsic functions are supported.
        NAME            FUNCTION                                TYPE
        ---------       --------------------------------    -------------
        ABS             absolute value                      same as input
        NINT            nearest integer                         INTEGER
        REAL            convert to real                         REAL
        INT             convert to integer by truncation        INTEGER
        SQRT            square root                             REAL
        COS,COSD        cosine   (radians, degrees)             REAL
        SIN,SIND        sine   (radians, degrees)               REAL
        TAN,TAND        tangent   (radians, degrees)            REAL
        ACOS,ACOSD      arccosine   (radians, degrees)          REAL
        ASIN,ASIND      arcsine   (radians, degrees)            REAL
        ATAN,ATAND      arctangent   (radians, degrees)         REAL
        EXP             e to the x                              REAL
        LOG,ALOG        natural logarithm                       REAL
        LOG10,ALOG10    common (base 10) logarithm              REAL
!
!               description of OCTAL command
!
1 OCTAL
Causes the expression to printed in octal (base 8) instead of decimal.
Format:

        /OCTAL  assignment

See HELP ASSIGNMENT for a discussion of the format of an assignment.
!
!               description of HEXADECIMAL command
!
1 HEXADECIMAL
Causes the expression to printed in hexadecimal (base 16) instead of decimal.
Format:

        /HEXADECIMAL  assignment

See HELP ASSIGNMENT for a discussion of the format of an assignment.
!
!
!               description of SAVE command
!
1 SAVE
Saves the current contents of the calculator symbol table in a file for later
use.  The file will contain editable records of the form:

        variable=value

You may display the current contents of the symbol table by entering:

        /SAVE TT

Format:

        /SAVE  [file-name]
!
2 Parameters
file-name

Specifies the name of the file to contain the output symbol table.  If a
previous version exists, a new version will be created.  The default type
is .DAT.  If no name is specified, then the name CALCSYM.DAT is used.
!
!               description of LIST command
!
1 LIST
List the contents of the symbol table at the terminal.

Format:

        /LIST
!
!               description of DELETE command
!
1 DELETE
Delete one or more symbols from the symbol table.

Format:

        /DELETE  symbol,symbol...
!
!               description of LOAD command
!
1 LOAD
Accepts input from a symbol table file and loads the variables and their
associated values into the calculator symbol table.

Format:

        /LOAD[/LIST][/OUTPUT] [file-name]
!
2 Parameters
file-name

Specifies the name of the file containing the symbol table input.  The file
must consist of one or more records of the form:

        variable=expression

The default type is .DAT.  If no file name is specified, then the name,
CALCSYM.DAT is used.
! 
2 Qualifiers
/LIST           list symbol table file as it is loaded
/NOLIST         do not list symbol table file as it is loaded  [default]
/OUTPUT         output the value of the expression as it is loaded
/NOOUTPUT       do not output the value as it is loaded [default]
!
!               description of EXIT command
!
1 EXIT
Terminates the CALC program.  

Format:

        /EXIT[/SAVE] filename 
2 Parameters
file-name

Specifies the name of the file to contain the output symbol table.  If a
previous version exists, a new version will be created.  The default type
is .DAT.  If no name is specified, then the name CALCSYM.DAT is used.
2 Qualifiers
/SAVE           save the symbol table in "filename"  [DEFAULT]
/NOSAVE         do not save the symbol table
!
!               description of CTRL-Z command
!
1 CTRL-Z
Terminates the CALC program.  The symbol table is not saved.
!
!		indirect command file
!
1 @filename
You may enter assignment statements, but not commands, using an indirect
command file.  The default type for filename is .COM.

