(self, name, as_type=None)
Get a variable in memory.
Get a variable in memory.
Get a variable in memory .
def get_variable(self, name, as_type=None):
        """Get a variable in memory."""
        name = name.upper()
        if b'(' in name:
            name = name.split(b'(', 1)[0]
            value = self.arrays.to_list(name)
            if not value:
                return []
            convert = self.get_converter(type(value[0]), as_type)
            return [convert(_item) for _item in value]
        else:
            value = self.memory.view_or_create_variable(name, []).to_value()
            convert = self.get_converter(type(value), as_type)
            return convert(value)
def get_variable ( self , name , as_type = None ) : name = name . upper ( ) if b'(' in name : name = name . split ( b'(' , 1 ) [ 0 ] value = self . arrays . to_list ( name ) if not value : return [ ] convert = self . get_converter ( type ( value [ 0 ] ) , as_type ) return [ convert ( _item ) for _item in value ] else : value = self . memory . view_or_create_variable ( name , [ ] ) . to_value ( ) convert = self . get_converter ( type ( value ) , as_type ) return convert ( value )