(
LET
(
(
(
•
l
{:~:~~:~;_var}
[{
:;:~~:=;-var}]
•..
=arith~xp
I
[LET]
fhar-Var
} [{Char-Var
~J
{ h }
char-arr-var ., char-arr-var
...
=
~h:~:~~
str-func str-func
The
LET
statement allows you
to
assign the value of an expression
to
one or more
variables. The syntax of the LET statement
is
as
shown:
l
{:~::~:~;_var}[{:;::~:~~;_var}]
...
=arith~xp
I
[LET]
fhar-var
} [{Char-Var
~J
{ h }
char-arr-var , char-arr-var
...
=
~h:;:~~
str4unc
str4unc
where:
var
are scalar variable names, subscripted references
to
array elements, or substring
references. Only one variable
is
required, although many can be specified. The
row and column references
to
an array element must be enclosed
in
parentheses.
exp
is
an arithmetic or character expression, a string function, or a character
constant.
When
the LET statement
is
executed,
the
expression
is
evaluated, and
the
resulting
value
is
assigned
to
the specified variables from left
to
right.
Character expressions containing
less
than 18 characters are padded on the right
with blanks
to
a length of 18 before being assigned
to
character variables. Character
constants containing more than 18 characters are truncated on the right
to
a length
of
18 before being assigned. Character constants containing no characters (null) are
assigned
as
18 blank characters.
83