Next: The Use of an
Up: Arithmetic calculations
Previous: Arithmetic calculations
  Contents
The definition of a name for an arithmetic expression is performed
by the command:
3 VAR(six-letter_name) =
arithmetic expression
;
[example: XVAL=[X,X]0.1 + [A,A]0.01 ;]
[example: A=2 0.5 -SIN(B) ;]
The
arithmetic expression
may contain the following items:
- constants [numbers like 4, 0.5 or 1.E-6]
- elements of the transfer matrix at zi, for instance,
[X,A], [Y,B], [X,AA], [X,AAD],
- operators [ like (+), (), (#EQ#), (#MAX#),
]
- functions [ like SIN,COS,LOG,EXP,TAN,
]
- names of earlier defined variables
- system parameters like PI$, XM$ or TXA$
Variables, constants, operators and functions are used like in an ordinary
programming language like FORTRAN. System parameters are like variables,
but with an $ at the end. Unlike variables, their values cannot be changed
by the user directly. System parameters are calculated by GICO during
runtime. They have a threefold purpose:
- 1.
- to spare the user the work to enter basic constants like
or the
speed of light directly
- 2.
- to supply the user with values defined by commands like P X or R P
- 3.
- to supply the user with certain numbers other than the matrix
elements of the transfer matrix, which are calculated internally
by GICO and are tedious or impossible to get by the use
of arithmetic expressions alone
For a complete list of the available operators, functions and system
parameters, see at the end of this manual.
Next: The Use of an
Up: Arithmetic calculations
Previous: Arithmetic calculations
  Contents
KPII
1999-10-20