This file contains general information for the Sather MATH classes.
If you have questions concerning this file or the classes, mail to
<schnetter@student.uni-tuebingen.de>.  This text was last updated on
1994/12/02.



INTRODUCTION:

The current Sather syntax for invoking a library function such as sin
is <expression>.sin:

class MAIN is
   main is
      #OUT + (1.5).sin + "\n";
   end;
end;

If you don't want to get used to this syntax, then you may do the
following:

class MAIN is
   include MATHFLT;
   main is
      #OUT + sin(1.5) + "\n";
   end;
end;

where MATHFLT defines all the function for FLT expressions.



GENERAL:

There are several classes yoy may include:

MATH: everyting

MATHI, MATHF, MATHC: integer, float, and complex functions

MATHINT, MATHINTI,
MATHFLT, MATHFLTD, MATHFLTX, MATHFLTDX, MATHFLTI,
MATHCPX, MATHCPXD, MATHCPXX, MATHCPXDX, MATHCPXI,
MATHCPX{ <FLT-type> }: for the corresponding types only

(There are some other classes defined in this package.  Do not use any
of these classes.  These are for internal use only.)

These classes are intended for including only.  They do not have any
attributes.  It does not make sense to define objects of these
classes.



INSTALLING:

The classes come in a whole bunch of files, instead of in one file
only.  This accelerates compiling, as normally nor all of the files
have to be parsed.  You should copy all these files into one
directory.  In the following I assume that this is the directory
'/home/user/Sather/Library/Math'.

In order to use these classes, you have to tell the compiler by adding
'-com /home/user/Sather/Library/Math/math.commands' to the call of the
compiler, as in

cs program.sa -o program -main PROGRAM
-com /home/user/Sather/Library/Math/math.commands

(but in one line!)

This is tedious.  A more convenient way to do so is to add this to
your environment variable SATHER_COMMANDS.  Assuming you set this
variable already to

-home /home/user/Sather -com /home/user/Sather/Library/base.commands

then you should instead set it to

-home /home/user/Sather -com /home/user/Sather/Library/base.commands
-com /home/user/Sather/Library/Math/math.commands

(again, in one line!).  Having done this, you can compile with

cs program.sa -o program -main PROGRAM

and the MATH classes are parsed automatically whenever a program of
yours uses them.



-erik
