From 229ef7449e30bd0602406ea4c7afdfe43fec86a5 Mon Sep 17 00:00:00 2001 From: Eric Swenson Date: Fri, 16 Aug 2024 17:32:11 -0700 Subject: [PATCH] Fixed SHRDLU issue that caused the display of an object name, when there was no object, to be "THE IL". The LISTNAMES function needed another conditioanl clause to handle the case where it was passed the NIL object (meaning "no object"). Now, it correctly answers "NOTHING" rather than "THE IL".h --- src/shrdlu/{newans.81 => newans.82} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename src/shrdlu/{newans.81 => newans.82} (99%) diff --git a/src/shrdlu/newans.81 b/src/shrdlu/newans.82 similarity index 99% rename from src/shrdlu/newans.81 rename to src/shrdlu/newans.82 index bd8a41e9..8f959823 100644 --- a/src/shrdlu/newans.81 +++ b/src/shrdlu/newans.82 @@ -783,7 +783,8 @@ TEST-LOOP ;;ANSWER HAS BEEN DECIDED ON. (PROG (COUNT EXAM X RES ANS COMMA?) (SETQ NAMES (MAPCAR '(LAMBDA (X) (NAMEOBJ X SPEC)) - (cond ((atom names) (list names)) + (cond ((null names) names) + ((atom names) (list names)) (t names)))) ;NAMEOBJ RETURNS A LIST OF THE OBJECT AND THE (COND ((NULL NAMES) (RETURN '((SAY NOTHING))))) ;THIS PATCH MAY WELL BE TOTALLOUT OF PHASE WITH @@ -941,7 +942,6 @@ TEST-LOOP ;;;############################################################ (DEFUN NAMEOBJ (ITEM SPEC) - ;;NAMES THE OBJECT IN ENGLISH -- GENERATES LIST OF THINGS TO ;;BE EVALUATED. SPEC IS EITHER 'INDEF OR 'DEF (PROG (TYPE: TYPELIST TYPE NAME: COLOR: COLORLIST SIZE: