next up previous contents index
Next: Substitutions Up: Programming with the interpreter Previous: How to change the   Contents   Index


String variables

String variables can be defined an used. For instance the instruction

 - interpcom -> string xx DFERF

will create the string variable xx containing the string DFERF. In further instructions or program lines each substring $[xx] will be replaced by DFERF. For instance

 - interpcom -> echo A_$[xx]_B

will print A_DFERF_B. Five strings are prefefined : RESDIR, COMDIR, DATADIR and DATA2DIR, which contain respectively the result directory, the command directory and the first and second data directories (cf. 3.4), and THREAD which contains the name of the running thread (cf. 10)..

The substitution of string variables is a particular case of the way to make substitutions in the command interpreter (cf. 4.5).

The command liststr gives the list of all defined strings. For example

 - interpcom -> liststr
RESDIR = ./res
COMDIR = ./com
DATADIR = ./data
DATA2DIR = ./data
THREAD = main
xx = DFERF

The command delstring is used to destroy already defined strings (except the predefined ones) :

 - interpcom -> delstring xx
 - interpcom -> liststr
RESDIR = ./res
COMDIR = ./com
DATADIR = ./data
DATA2DIR = ./data
THREAD = main



2009-11-12