next up previous contents index
Next: Other useful functions in Up: $FILE Previous: How to define thread-specific   Contents   Index


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 _ and by the name of the member.




ch_expr n


Here n is a numerical expression evaluated as an integer. Makes the n-th expression evaluator the default one. Number 0 gives the usual expression evaluator, 1 uses complex numbers, and the next ones are the supplementary ones defined in the program (cf. 7.7).




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.




color_echo color


With this command it is possible to change the color of output of the commands echo, echof and echoi. The possible colors are black, red, green, yellow, blue, magenta, lightblue and white. If no argument is given to this command, the default color is used.



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. 6.5).




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.



delstring xxx


This command deletes the string variable xxx (cf. 4.4).




depend Xxx prog A1 ... An


Makes the object or structure Xxx dependent on the objects or structures A1,...,An, using the program prog (cf. 6.12).




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 strucure xxx.




echo zzz1 zzz2 ...


This command prints the strings zzz1, zzz2,... separated with spaces. The character '%' in the end of an argument will be changed in a blank space. Any occurence of
n
in an argument will be interpreted as a newline. For instance

 - interpcom -> echo A\nBCD ZZZ
A
BCD ZZZ - interpcom ->

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 '$\backslash$' is found.



end_mon


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




eval zzz


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




fillobj obj xxx


This command fills the real object obj according to the formula xxx. In xxx, the i+1-th dimension of obj is represented by the variable xi. For instance, if obj has 3 dimensions and we type

fillobj obj x0+x1+x2

obj(i,j,k) will contain i+j+k, for every admissible values of i, j, k.

For complex objects, two formulas must be given, one for each component of the corresponding complex numbers (real and imaginary parts, or modulus and phase).




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.




functdef func(var_1,...,var_n) form


This command defines the function func with n variables var_1,..., var_n, using the formula form (cf. 7.3).




greet


This prints the greeting message (cf. 3.8).




help xyz

will print the content of the subject whose name is xyz. If xyz is not the name of a subject, the names of the subjects beginning with xyz will be printed. If only one subject begins with xyz, its name and its content will be printed.




hist


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

- interpcom ->  !n

where n 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. 7.1).




is var


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




kill thr


This command will stop the execution of the thread thr definitely (cf. 10).




list


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




listfunc func


With no arguments, this command gives the list of all the user defined numerical functions (cf. 7.3 with their formulas. With an argument this command will only give the formula of the function whose name is the argument.




liststr


This command gives the list of the string variables that have been defined (cf. 4.4).




listt


This command prints the list of all the running threads.




load zzz


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




loop


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




loopf


This command is used to produce command files simulating loops (cf. 4.7.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. 4.9).




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

- interpcom ->  !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. 6).




pause thr x


This command will stop the execution of the thread thr if the numerical evaluation of x gives a positive number, and continues the execution of this thread otherwise (cf. 10).




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,

- interpcom -> proglist prog

will print the list of the instructions of this program.




question


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




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 :

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

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

- interpcom -> 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 4.7.2).




restore


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




send_print n


The expression n is evaluated as an integer. If this integer is -1, all the messages printed using the function print(...) (in particular those coming from the interpreter) will not be printed on screen, but will be printed on the monitor file (if any). If the integer is 0, then the default behaviour of print(...) will be restored. See also the command silence... and 10.4.




setdir xxx dir


This command is used to change the command directory, the result directory, the first data directory or the second one. The possible corresponding values of xxx are : com, res, data and data2, and dir is the name of the new directory. Thre is no verification of the existence of this directory. See 3.4.




setobj obj x i1 ... in


Sets the value of the term (i1,...,in) of the real object obj to x. Here x is a numerical expression that will be converted by the expression evaluator into a double precision number. The terms i1,..., in are also numerical expressions that will be converted to integers. Of course n must be the number of dimensions of obj, and (i1,...,in) must be admissible indexes. For instance

setobj obj 2.5 2 3 4

will set obj(2,3,4) to 2.5 (provided obj has 3 dimensions).

For complex objects two numerical expressions must be given, one for each component of the terms of the object.




shell com


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

- interpcom -> shell ls -l




si var


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




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 instance 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 instance the functions error_mess and print (cf. 12.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.




string xxx nnn


This command defines the string variable xxx containing the string nnn (cf. 4.4).




strucdef


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



substract 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. 6.7).




thread thr prog arg1 arg2 ....


This command creates the thread whose name is thr, running the program prog with arguments arg1, arg2,... (cf. 10).




time nn


This command is used to measure the execution time of a program (or 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


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




trace n


If the numerical expression n is different from 0 each subsequent command will be traced, i.e its return value will be put in the variable retval of the expression evaluator. If n is 0 the subsequent commands will not be traced any longer.




undef var


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

undef *

deletes all the variables defined in the current thread, and

undef **

deletes also the global variables.




undepend A

Makes the object A independant of other objects or structures. See the command depend and 6.12.




update A

Updates the object A according to the rules specified by the command depend... Cf. 6.12.




varlist n


If the argument n is omitted, this command gives the list of all the variables of the usual expression evaluator that have been defined. If n is present, it is evaluated as an integer, and the list of the variables of the n-th expression evaluator is printed (of course n must be a valid number). The command

- interpcom -> varlist all

is used to print the list of all the variables of all the expression evaluators.




wait thr _x


This command suspends the execution of the thread thr if the global variable _x is not positive (in particular if it is not defined). If _x becomes positive, then the execution of the thread continues (cd. 10).




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 :

- interpcom -> write fic 1. 2. 3.

An extra new line character can be written by the instruction

- interpcom -> write fic _ligne

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

- interpcom -> 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.


next up previous contents index
Next: Other useful functions in Up: $FILE Previous: How to define thread-specific   Contents   Index
2009-11-12