在下面的代码中,我想找到一种首先读取字符的方法(通过用户输入“3.”,然后从
listCharacters 数据库
中删除/撤回该字符的数量
:- dynamic listCharacters/1.
listCharacters(Joe).
listCharacters(Tom).
listCharacters(Peter).
:- write_ln('Type in the name of the character you have from the below list.
Example "Tom" '), write_ln('1. Joe'), write_ln('2. Tom'), write_ln('3. Peter'),
read(X), retract(listOfCharacters(X)).