(self, args)
DEF FN: define a function.
DEF FN: define a function.
DEF FN : define a function .
def def_fn_(self, args):
        """DEF FN: define a function."""
        fnname, = args
        fnname = self._memory.complete_name(fnname)
        # don't allow DEF FN in direct mode, as we point to the code in the stored program
        # this is raised before further syntax errors
        if not self.run_mode:
            raise error.BASICError(error.ILLEGAL_DIRECT)
        # arguments and expression are being read and parsed by UserFunctionManager
        self.parser.user_functions.define(fnname, self._program_code)
def def_fn_ ( self , args ) : fnname , = args fnname = self . _memory . complete_name ( fnname ) # don't allow DEF FN in direct mode, as we point to the code in the stored program # this is raised before further syntax errors if not self . run_mode : raise error . BASICError ( error . ILLEGAL_DIRECT ) # arguments and expression are being read and parsed by UserFunctionManager self . parser . user_functions . define ( fnname , self . _program_code )