next up previous contents
Next: 6.3 Logical expressions Up: 6. FORTRAN style interpreter Previous: 6.1 Variables

   
6.2 Arithmetic expressions

KUPLOT allows the use of arithmetic expressions using the same notation as in FORTRAN. Valid operators are `+', `-', `*', `/' and `**'. Expressions can be grouped by round brackets ( and ). The usual hierarchy for the operators holds. Values of expressions can be assigned to any modifiable variable. If you know FORTRAN (or another programming language) you will have no problems with these examples.

i[0] = 1
r[3] = 3.1415
r[i[1]] = 2.0*(i[5]-5.0/6.5)



Thomas Proffen {Billinge}
1999-06-26