At the present stage it only supports following functionalities:
See also the ToDo and Bug section for more information what is missing or does not work.
gzip -cd | tar -xvf - on a console. This will unpack the sources into the current working directory.cd ecas-0.1 to change into the newly create source directory../configure --prefix=/usr/local will suffice to prepare the sources for compilation and installation.make all install to build and install the package.
#include <ecas.h>
int main(int, char**) {
// Creates a variable named 'x'
Variable x("x");
// Creates a variable named 'y'
Variable y("y");
// A LongInt of the value 2
LongInt li(2);
// Add the two variables
CASObject *tmp = x.Add(&y);
// Multiply the previous result with the LongInt
CASObject *result = tmp->Multiply(&li);
// Release the memory occupied by the first result
CASObject::Garbage->Put(tmp);
// Evaluate the result
tmp = result->Evaluate();
// Release the memory occupied by the unevaluated result
CASObject::Garbage->Put(result);
// Print the result to the screen
tmp->Print();
// Release the memory occupied by the evaluated result
CASObject::Garbage->Put(tmp);
exit(0);
}
When compiling, you have to include the pthread as well as the ecas library.
Using gcc, the command looks something like that, assuming you have pasted the above snippte in a file named main.cc
g++ -O0 -g3 -lecas -lpthread -o ecastest main.cc
1.4.7