Next: 12.2 Indexed variables Up: 12 VARIABLES Previous: 12 VARIABLES


12.1 Setting variables

A variable can be defined using

variable1=value1, variable2=value2, ...

A variable definition is recognized by the equals sign in the first field of the input card. For example,

THRESH,ENERGY=1.d-8,GRADIENT=1.d-5

does not define variables; here ENERGY and GRADIENT are options for the THRESH directive.

Variables can have different types:

Numbers:
The value is a number or an expression. The general form of value is
expression [,] [unit]
unit is an optional string which can be used to associate a unit to the value. ANG[STROM], DEGREE, HARTREE are examples. Undefined variables in expressions are assumed to be zero (and defined to be zero at the same time).
Logicals:
The value can be .TRUE. or .FALSE. (.T. and .F. also work), or a logical expression. Internally, .TRUE. is stored as 1 and .FALSE. as zero.
Strings:
The value can either be a string enclosed in quotes or a string variable. See section 8.3 for more details.



molpro@molpro.net
Oct 10, 2007