Next: 6.5 Intrinsic functions Up: 6 GENERAL PROGRAM STRUCTURE Previous: 6.3 Input structure


6.4 Expressions

In any input field, data can be entered in the form of expressions. Numbers and variables are special cases of expressions. An expression is typed in Fortran style and may contain any number of nested parenthesis. The standard intrinsic functions are also available (see next section). MOLPRO understands both arithmetic and logical expressions. The result of an arithmetic expression is a real (double precision) number. Internally, all integers are also converted to real numbers. The result of a logical expression is either .TRUE. or .FALSE.. Internally, .TRUE. is stored as a one (1.0), and .FALSE. as zero (0.0). Expressions may contain any number of variables.

The following standard operations can be performed :

expr + expr
Addition
expr - expr
Subtraction
expr * expr
Multiplication
expr / expr
Division
expr .OR. expr
Logical OR
expr .AND. expr
Logical AND
expr .XOR. expr
Exclusive OR
.NOT.expr
Logical NOT
expr .GT. expr
Greater Than
expr .EQ. expr
Equal
expr .LT. expr
Less Than
expr .GE. expr
Greater Equal
expr .LE. expr
Less Equal
expr .NE. expr
Not Equal
expr **expr
Exponentiation
expr ^ expr
Exponentiation
(expr)
Parenthesis (no effect)
-expr
Change sign
+expr
Keep sign (no effect)



Next: 6.5 Intrinsic functions Up: 6 GENERAL PROGRAM STRUCTURE Previous: 6.3 Input structure

P.J. Knowles and H.-J. Werner
molpro@tc.bham.ac.uk
Jan 15, 2002