(self, args)
CLEAR: clear memory and redefine memory limits.
CLEAR: clear memory and redefine memory limits.
CLEAR : clear memory and redefine memory limits .
def clear_(self, args):
        """CLEAR: clear memory and redefine memory limits."""
        try:
            # positive integer expression allowed but not used
            intexp = next(args)
            if intexp is not None:
                expr = values.to_int(intexp)
                error.throw_if(expr < 0)
            # set size of BASIC memory
            mem_size = next(args)
            if mem_size is not None:
                mem_size = values.to_int(mem_size, unsigned=True)
                self.memory.set_basic_memory_size(mem_size)
            # set aside stack space for GW-BASIC.
            # default is the previous stack space size.
            stack_size = next(args)
            if stack_size is not None:
                stack_size = values.to_int(stack_size, unsigned=True)
                self.memory.set_stack_size(stack_size)
            # select video memory size (Tandy/PCjr only)
            video_size = next(args)
            if video_size is not None:
                video_size = round(video_size.to_value())
                self.display.set_video_memory_size(video_size)
            # execute any remaining parsing steps
            next(args)
        except StopIteration:
            pass
        self._clear_all()
def clear_ ( self , args ) : try : # positive integer expression allowed but not used intexp = next ( args ) if intexp is not None : expr = values . to_int ( intexp ) error . throw_if ( expr < 0 ) # set size of BASIC memory mem_size = next ( args ) if mem_size is not None : mem_size = values . to_int ( mem_size , unsigned = True ) self . memory . set_basic_memory_size ( mem_size ) # set aside stack space for GW-BASIC. # default is the previous stack space size. stack_size = next ( args ) if stack_size is not None : stack_size = values . to_int ( stack_size , unsigned = True ) self . memory . set_stack_size ( stack_size ) # select video memory size (Tandy/PCjr only) video_size = next ( args ) if video_size is not None : video_size = round ( video_size . to_value ( ) ) self . display . set_video_memory_size ( video_size ) # execute any remaining parsing steps next ( args ) except StopIteration : pass self . _clear_all ( )