The LET Statement

The LET Statement

    This statement is used to assign a value to a variable. Its format is
    let
    Where
    l– a statement number (label)
    v– Variable name
    expr– an expression
    eg :
    10 LET A = 15
    This will assign the value 15 to the variable A.
    10 LET B = 4 + 5 *6
    First the expression 4 + 5 * 6 is evaluated according to the rules of evaluation of expressions. The value is 34. This value is assigned to the variable B.Instead the above statement it can also be written as LET statement is optional in BASIC.
    10 A=15 and
    10 B=4+5*6

Last modified: Wednesday, 18 January 2012, 11:02 PM