Introduction to the Basix package

The basix package contains the usual data types, the language environments, the evaluators and the abstract language on which the Mathemagix language is actually based.

Installation notes and the most recent version of this package are to be found from the Mathemagix Internet home page available from www.mathemagix.org.

1.A simple example of use

Here follows a simple example named example.cpp:

#include "basix/string.hpp"
#include "basix/list.hpp"

using namespace mmx;

int main () {
  list<string> x ("a", "b", "c");
  list<int> y (1, 2, 3);

  mmout << "x = " << x << "\n";
  mmout << "y = " << y << "\n";
}

The following command can be used to compile file:

g++ ‘basix-config --cppflags --libs‘ example.cpp -o example

As a result you can now run example and obtain:

["a", "b", "c"]
[1, 2, 3]

Hereabove the command basix-config –cppflags –libs produces all the necessary include and library paths. More options are described though basix-config –help:

Usage: basix-config [OPTION]

Available values for OPTION include:

--cppflags    compiler preprocessor flags
--exec-prefix basix install prefix for executables
--help        display this help and exit
--libs        library linking information
--prefix      basix install prefix
--version     output version information
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License. If you don't have this file, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.