still getting undefined meaning after
replacing(^^meaning with ??meaning etc...) what
other solutions to get around this? also present wont
give the desired result of checking is user was
previous...
neither read_list or make_all works at present...
[] -> database;
;;;load 'mytest.p';
make_all_lists(items) -> lists;
lists -> response;
read_lists_in_file('mytest.p') -> lists;
define converse();
vars list,answer,name;
[hello] =>
[what is your name?] =>
readline() -> name;
if present([??name]) then
[hello ^^name it is nice to meet you again] =>
else
[hello ^^name it is nice to meet you] =>
endif;
[well - what do you want to talk about?] =>
repeat forever
readline() -> list;
quitif(list = [bye] or list = [good bye]);
;;;storedata('mytest.p');
answer(list) =>
endrepeat;
[goodbye ^^name - talk to you another time.] =>
enddefine;
define make_all_lists(items) -> lists;
vars lists,items;
enddefine;
define checkfact(thing,meaning) -> response;
vars info;
if present ([^^thing ^^meaning]) then [I am aware of
that] -> response
elseif present ([^^thing ??info]) then [no - ^^thing
^^info] -> response
else add ([^^thing ^^meaning]);
[Ok - I nave noted that] -> response
endif;
enddefine;
;;; vars (== bye) -> bye;
;;;
forget([seattle], [is located in washington])
;;; ([seattles],
[is located in waqshington])
__________________________________
Do you Yahoo!?
Check out the new Yahoo! Front Page.
www.yahoo.com
|