Prev Next Title Contents

SYNTAX OF THE GIFA INPUT.

Each command line is composed of a series of "words" separated by blanks. A word can be a command or a parameter. Words are strictly separated by blanks, however a word can be of several nature :


*literal are as typed:

chsize


*literal string are enclosed within single (') or double(") quotes:

'a string' or "another string" or "yet an'other valid string"


*The special character % (to be used only as a parameter for a command) takes the place of the default value of the command:

EM %


*The special string %% takes the place of the whole series of all the default values of the remaining parameters of the command :

ZOOM 1 % % % % and ZOOM 1 %% are equivalent

Many commands know how to deal with this syntax, for instance BCOOR 1/2 needs a series of point to compute the baseline correction. If you have previously clicked on a set of points on the data, you will be prompted for the values corresponding to these points. So

bcorr 1 1 %%

will just do the work.

The baseline correction interactive macros use this feature.


*variables are substituted before use (more about this later):

$variable1


*expressions, enclosed within parentheses, are evaluated before use (more about this later) :

( 2*(cos(3) + 1))


*any of the preceding syntaxes may be preceded with a < symbol. In which case the input is interpreted as a file name, and the parameters takes the value of the next line read in the file (if already OPENed). A complete line is read at each time.

Each of these syntax can be used in any places; however, a single word cannot match a series of words :

These are valid syntax :

row $i ; select row i

row (%+1) ; select the next row

col (2*$i +1) ; select col 2i+1

set apod = 'sin' $apod 0.5 ; perform sin 0.5

read ("/usr" // $user // $exp) ; read a file

("simu" // "noe") ; execute the command SIMUNOE

set f = test open $f row <$f ; select the row whose index ; is found in file called test

These are invalid syntax :

set apod = 'sin 0.5' $apod

a single word (here 'sin 0.5') cannot be used to match several words

EM 1+2

the parenthesis are needed for expression to be evaluated

etc...

A line cannot be longer than 256 characters, otherwise the end the line will be lost. If a longer line is needed, a continuation sign is available : \

e.g.

Gifa> print 'A line cannot be very long' print \

\Gifa> 'But can be continued' print 'as many time as you wish'

You can put as many continuation sign as you want, however, these signs are considered as "word", so they should be blank separated, and cannot be used within evaluated expressions (see below).


Prev Next Title Contents