Skip to main content

This version of the product is no longer supported, and this documentation is no longer updated regularly. See the latest version of this content.Opens in a new tab

LET

Assigns a value to a variable.

Synopsis

LET var=expression

Arguments

var Any valid variable name.
expression Any MVBasic expression that resolves to a value.

Description

The LET statement assigns the value of expression to the variable var. You can perform the same assignment operation by just specifying var=expression without the LET keyword. For further details on assignment operations, refer to the Variables page of this manual.

LET permits value assignment to all valid variable names, including variable names that are keywords. For clarity and compatibility, use of keywords as variable names is discouraged.

Examples

The following examples use LET to assign values to the variable x:

LET x=12
LET x="Fred"
LET x="Con":"catenate"
LET x=""
LET x=4+4*3;    ! Returns 16
LET x=(4+4)*3;  ! Returns 24

See Also

FeedbackOpens in a new tab