next up previous contents index
Next: Changes Up: Introduction Previous: Introduction   Contents   Index


Description of the command interpreter

The command interpreter is a library (written in C) which allows the creation of programs that can accept commands given interactively by the user or programs that are sequences of commands.

interpcom is not a programming language, like Perl or Python. It just gives the possibility to embed a command interpreter in an application.


The main features of the command interpreter are :


- the possibility to add new commands in a very easy way. It contains 81 built-in commands.

- the use of an expression evaluator, written by Mark Morley, which can be used to parse numeric arguments, or make direct computations, and define variables. It is possible to add easily new expression evaluators. One using complex numbers is implemented in the library.

- the possibility to write, load and execute programs, which are sequences of commands, using loops and jumps.

- the definition of objects which are arrays of several types of numbers, having names. So it is possible to refer to objects in arguments of commands for instance, by giving their name. It is also possible to define structures, whose members are objects, other structures or variables of the expression evaluator.

- there is an implementation of complex numbers in two ways. The library contains also some functions that simplify the use of arrays of numbers.

- it is possible to run several programs simultaneously, and these programs can communicate with each other (threads).


It is also possible to glue several applications of the command interpreter.

An application of the command interpreter needs an initialization file which contains a configuration of the interpreter. This file can be used in two ways : it can be read in the beginning of the execution, or it can be included in the executable.


This manual is organized as follows :


In chapter 2 we show how to compile and install the library.

In chapter 3 the structure of an initialization file for the interpreter is given. It is divided in sections which will determine the behavior of the interpreter.

In chapter 4 we explain how to write and use programs, command files and threads.

In chapter 5 we show how commands can be written and implemented.

The chapter 6 treats of objects and structures, how they can be defined and used.

The chapter 7 is a description of the expression evaluator.

The chapter 8 is a description of question files, a way to give parameters to the interpreter.

In chapter 10 we show how to create and use threads.

The chapter 11 gives the list of all the commands that are implemented in the library.

In chapter 12 we describe some functions of the library that might be useful in applications of the command interpreter.

The chapter 13 describes the implementations of complex numbers and gives the list of the functions of the library that use these numbers.

The chapter 14 is a short tutorial.


next up previous contents index
Next: Changes Up: Introduction Previous: Introduction   Contents   Index
2009-11-12