INCLAN: eval: Difference between revisions
Jump to navigation
Jump to search
(Created page with 'Usage: eval ''variable'' = ''expression'' show ''variable'' ... set ''variable'' ... set ''variable'' = ''value'' unset ''variable'' ... ''vari…') |
|||
(9 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
== Synopsis == | |||
'''eval''' ''variable'''''='''''expression'' | |||
''variable'''''='''''expression'' | |||
== Description == | |||
Evaluates the arithmetic or string ''expression'' according to the rules of FORTRAN-77 and assigns the result to the ''variable''. The keyword '''eval''' can be omitted. FORTRAN-77 function names must be given in lowercase letters. | |||
'' | |||
== Examples == | |||
eval i = 7 | |||
sentence = ’A flexible program!’ | |||
j = mod(i,4)**2 | |||
l = len(sentence) | |||
show i sentence j l | |||
... Variables: | |||
i = 7 | |||
sentence = ’A flexible program!’ | |||
j = 9 | |||
l = 19 |
Latest revision as of 14:42, 13 August 2009
Synopsis
eval variable=expression
variable=expression
Description
Evaluates the arithmetic or string expression according to the rules of FORTRAN-77 and assigns the result to the variable. The keyword eval can be omitted. FORTRAN-77 function names must be given in lowercase letters.
Examples
eval i = 7 sentence = ’A flexible program!’ j = mod(i,4)**2 l = len(sentence) show i sentence j l ... Variables: i = 7 sentence = ’A flexible program!’ j = 9 l = 19