let Statement

The let statement assigns the value of an expression to a variable.

Syntax

{let} var = exp

Parameter(s)

var

Variable that is assigned the value of exp. Can be a simple variable, an array element, an extraction, substring, or both extraction and substring.

exp

Value to be assigned to var.

Description

The let statement is a holdover from the original Dartmouth BASIC, and is only included for compatibility. It is supported to facilitate program readability.

Example(s)

let a = 5

The statement above is exactly the same as:

a = 5

See Also

= Assignment Operator, Assignment, Statements and Functions