(self, args)
RENUM: renumber program line numbers.
RENUM: renumber program line numbers.
RENUM : renumber program line numbers .
def renum_(self, args):
        """RENUM: renumber program line numbers."""
        new, old, step = args
        new, old = self._program.explicit_lines(new, old)
        if step is not None and step < 1:
            raise error.BASICError(error.IFC)
        old_to_new = self._program.renum(self._console, new, old, step)
        # stop running if we were
        self.set_pointer(False)
        # reset loop stacks
        self.clear_stacks()
        # renumber error handler
        if self.on_error:
            self.on_error = old_to_new[self.on_error]
        # renumber event traps
        for handler in self._basic_events.all:
            if handler.gosub:
                handler.set_jump(old_to_new[handler.gosub])
def renum_ ( self , args ) : new , old , step = args new , old = self . _program . explicit_lines ( new , old ) if step is not None and step < 1 : raise error . BASICError ( error . IFC ) old_to_new = self . _program . renum ( self . _console , new , old , step ) # stop running if we were self . set_pointer ( False ) # reset loop stacks self . clear_stacks ( ) # renumber error handler if self . on_error : self . on_error = old_to_new [ self . on_error ] # renumber event traps for handler in self . _basic_events . all : if handler . gosub : handler . set_jump ( old_to_new [ handler . gosub ] )