(self, args)
LET: assign value to variable or array.
LET: assign value to variable or array.
LET : assign value to variable or array .
def let_(self, args):
        """LET: assign value to variable or array."""
        name, indices = next(args)
        name = self.complete_name(name)
        if indices != []:
            # pre-dim even if this is not a legal statement!
            # e.g. 'a[1,1]' gives a syntax error, but even so 'a[1]' is out of range afterwards
            self.arrays.check_dim(name, indices)
        value = next(args)
        if isinstance(value, values.String):
            # if already permanent, store a deep copy to avoid double referencing
            # if RHS is a field string, deep copy as LHS should not point to the field
            if self.strings.is_permanent(value) or self.strings.is_field_string(value):
                value = value.new().from_str(value.dereference())
        self.set_variable(name, indices, value)
def let_ ( self , args ) : name , indices = next ( args ) name = self . complete_name ( name ) if indices != [ ] : # pre-dim even if this is not a legal statement! # e.g. 'a[1,1]' gives a syntax error, but even so 'a[1]' is out of range afterwards self . arrays . check_dim ( name , indices ) value = next ( args ) if isinstance ( value , values . String ) : # if already permanent, store a deep copy to avoid double referencing # if RHS is a field string, deep copy as LHS should not point to the field if self . strings . is_permanent ( value ) or self . strings . is_field_string ( value ) : value = value . new ( ) . from_str ( value . dereference ( ) ) self . set_variable ( name , indices , value )