List of available commands



add  obj1  obj2  obj3

This command is used to add two objects. Here the objects  obj1 , obj2  are added and the result is stored in object  obj3 . The objects must have been defined and be of the same type. Their dimensions must be the same.



assign   struc  mb_name  obj_name

This command assigns the object (or structure) whose name is  obj_name  to the member  mb_name  of the structure struc . If the member  mb_name  is a variable of the expression evaluator, the syntax is different :

assign   struc   mb_name   xxx

where  xxx  is a numerical expression. The name of the variable is the name of the structure, followed by a and by the name of the member.



clock  n

Here  n  is a numerical expression. If its value is non zero, the execution time of each further command or program will be printed (if it is more than 1 second). If it is zero the execution time will no longer be printed.



close name_fic

This command closes the file  name_fic  of the data directory 1 (cf. the commands  read  and  write ).



cmultiply   obj1   xr   xi   obj2

See the command multiply .



conjg   obj1   obj2

Computes the conjugate of the complex object  obj1  and stores the result in  obj2. The two objects  obj1  and  obj2 must be of the same (complex) type and have the same dimensions.



const   obj   x

This command gives the real constant value x to each term of the object whose name is obj . The object can be a real or complex one, and x a numerical expression.



const_c   obj   xr   xi

This command gives the complex constant value  xr+i.xi to each term of the object whose name is  obj . The object must be a complex one, and  xr , xi are numerical expressions.



const_r   obj   R

This command gives the module R to each term of the object whose name is obj. The object must be a complex one, and R a positive numerical expression.



const_th obj T

This command gives the phase  T  to each term of the object whose name is   obj . The object must be a complex one, and   T  is a numerical expression.



copy   obj1   obj2

This command copies the object  obj1 to obj2 . They must be of the same type and their dimensions must be the same. Objects of undefined type are not allowed (cf. section 5.4).



delcom   xxx

This command deletes the file  xxx of the command directory.



deldat   xxx

This command deletes the file  xxx  of the data directory 1.



delprog   prog

This command deletes the program  prog .



delres   xxx

This command deletes the file  xxx  of the result directory.



desassign   struc   mb_name

This command suppresses the association of the member  mb_name  of the structure  struc  to an object or structure.



desc   struc

This command prints a description of the structure  struc , i.e. it prints the list of the members of struc .



destroy   xxx

This command destroys the object or structure  xxx.



echo   zzz

This command prints the string  zzz . The command  ' echo \n '  will print a new line. This will work also inside a program that runs silently. This command is useful to print messages from such programs.



echof   zzz

This command evaluates the string  zzz (with the expression evaluator) and prints the result (as a real number). This will work also inside a program that runs silently. This command is useful to print messages from such programs.



echoi   zzz

This command evaluates the string  zzz (with the expression evaluator) and prints the result (as an integer). This will work also inside a program that runs silently. This command is useful to print messages from such programs.



editor   xxx

This command opens a file called  xxx in the command directory and the following lines are stored in this file, until a line containing the only character '\' is found.



end_mon

This command closes the monitor file (cf. section 3.7 and the command  mon ).



eval   zzz

This command evaluates the string  zzz  and prints the result. This value is stored in the variable  ' curvar '.



exit

This command terminates the execution of the command interpreter.



flush

This command puts any buffered output to the monitor file to be effectively written on it.



hist

This command prints the preceeding instructions given to the interpreter. The number of printed commands is a parameter of the initialization file (cf. section 2.1). A preceeding instruction can be executed by the command

interpreter -> !n

where  is the number of the instruction. See also the command   numcom .



Imag   C_obj   R_obj

Puts the imaginary part of the complex object  C_obj in the real object  R_obj. The two objects must be of the same precision (single or double) and have the same dimensions. The two kinds of complex numbers are allowed.



initvar

This command creates variables (of the expression evaluator) from the hidden variables (cf. section 6.1).



is   var

This command is used to end conditional execution of some instructions (cf. section 3.4).



list

This command gives the list of objects and structures that have been defined (cf. section 5).


load   zzz

This command loads in memory the programs stored in the file zzz of the command directory (cf. section 3.6).



loop

This command is used to produce command files simulating loops (cf. section 3.5.2).



loopf

This command is used to produce command files simulating loops (cf. section 3.5.2).



mkcomplex   Re   Im   Cobj

Puts the real object  Re  in the real part of the complex object  Cobj  and the real object  Im  in the imaginary part of  Cobj. The objects  Re, Im  and  Cobj  must be of the same precision (single or double) and have the same dimensions. The two kinds of complex numbers are allowed.



mkpolaire  R   Th   Cobj

 Sets the values of the terms of the complex object Cobj. Their modules are given by the real object R and their phase by Th. The objects  R, Th  and  Cobj  must be of the same precision (single or double) and have the same dimensions. The two kinds of complex numbers are allowed.



mon   xxx

This command is used to create a monitor file (cf. section 3.7).



multiply   obj1   x   obj2

This command multiplies the object  obj1  by the numerical expression xxx and stores the result in the object  obj2 . The two objects must be real, of the same type, and their dimensions must be the same. For complex objects the following syntax is used :

cmultiply   obj1   xr   xi   obj2

Here the complex object  obj1  is multiplied by  xr + xi.i  and the result is stored in  obj2 .



numcom   nnn

In this command, nnn  is first evaluated as an integer. If this integer is non zero, the number associated to the following instructions will be printed. The first instruction has number 0, and each new instruction increments it. The instruction number n can be recalled with the command

interpreter -> !n

If the number of the present instruction is  m , m-n  must not be bigger than the maximal number of instructions kept by the interpreter, which is fixed in the initialization file. See also the command  hist . Instructions contained in a program or in a command file do not increment the instruction number.



objdef

This command is used to create objects. In general it should not be used directly (cf. section 5).



phase   Cobj   Robj

Puts the phase of the terms of the complex object  Cobj  in the real object  Robj. The objects  Cobj, Robj  must be of the same precision (single or double) and have the same dimensions.



proglist

This command prints the list of all the programs in memory. If prog is one of them,

interpreter -> proglist  prog

will print the list of the instructions of this program.



question

This command is used to read question files (cf. section 7).



radius   Cobj   Robj

Puts the module of the terms of the complex object  Cobj  in the real object  Robj. The objects  Cobj, Robj  must be of the same precision (single or double) and have the same dimensions.



read   ccc   x

This command reads a real number in the file  ccc of the data directory 1, and stores it in the variable  x . See also the commands   write  and  close .

Example :

interpreter -> write  fic  1.  2.  3.
interpreter -> close  fic
interpreter -> read  fic  x
interpreter -> read  fic  y
interpreter -> read  fic  z
interpreter -> x
1.000000
interpreter -> y
2.000000
interpreter -> z
3.000000

In the preceeding example, numbers are read from text files. It is also possible to read binary files, by adding the keyword  -bin . For example

interpreter -> read  fic  x  -bin

will read the floating point number  x (in simple precision) in the binary file  fic .



Real   C_obj   R_obj

Puts the real part of the complex object  C_obj  in the real object  R_obj. The two objects must be of the same precision (single or double) and have the same dimensions. The two kinds of complex numbers are allowed.



repete   com1   com2 ... xx1   xx2 ...

will create a command file called  com1 (in the command directory). This file will contain successive calls to the command file  com2 , the first with the argument  xx1 , the second with the argument   xx2 , and so on (see section 3.5.3).



restore

This command is used to load objects stored in the results directory (cf. section 5.6).



shell   com

This command executes the shell command  com , that may have several arguments. For example :

interpreter -> shell  ls  -l



si   var

This command is used to begin the conditional execution of instructions (cf. section 3.4).



silence   nnn

In this command,  nnn  is evaluated as an integer. If it is zero the instructions that follow will run silently. This command should be used mainly inside programs, if one wants for example to avoid the printing of all the instructions inside a loop. Of course the commands must be written appropriately to be able to run silently. For example the functions  error_mess  and  print  (cf. section 9.2) can be used to print something on the screen from a command. The commands  echo , echof  and echoi  are not affected by  silence . If nnn  is non zero the program stops running silently.



strucdef

This command is used to create structures. In general it should not be used directly (cf. section 5).



sub   obj1   obj2   obj3

This command is used to substract two objects. Here the object obj2  is substracted to  obj1 , and the result is stored in object  obj3 . The objects must have been defined and be of the same type. Their dimensions must be the same.



svg

This command is used to save objects in the results directory (cf. section 5.6).



time   nn

This command is used to measure the execution time of a program (or of a part of a program). For this the instruction

time  0

must be given at the beginning . It sets the clock to 0. To print the execution time one uses the instruction

time

(without argument) . The number of seconds since the first instruction will then be printed.



undef   var

This command deletes the variable var of the expression evaluator (if it has been defined).



varlist

This command gives the list of all the variables of the expression evaluator that have been defined.



write   ccc   expr

See also the commands  read  and close . This command writes the real number corresponding to the expression expr  in the text file  ccc  of the data directory 1. A new line character is also written after the number. It is possible to write several numbers on the same line, by giving the list of these numbers

Example :

interpreter -> write  fic  1.  2.  3.

An extra new line character can be written by the instruction

interpreter -> write  fic  _ligne

It is also possible to write binary files, by adding the keyword -bin . For example

interpreter -> write fic  -bin  x  y

will print the floating point numbers corresponding to the expressions x , y (in simple precision) in the binary file fic .
 
 


Main page
Chapters   1  2   3  4   5  6   7  8   9   10   11