语法错误:。或表达式1错误编译失败后预期的运算符

问题描述 投票:-2回答:1

namelist=integer*;

谓词

member12(namelist,namelist,namelist);

条款

member12([],L,L).
member12([X|L1],L2,[X|L3]):-
   member12(L1,L2,L3).
prolog
1个回答
0
投票

好吧,好像你没有提供整个代码,考虑到你的错误,我会说它在你的目标部分。

你可能有这条线:

consult('D:\\Prolog\\list.pl')

并且错误消息指出缺少“.或operator”

consult('D:\\Prolog\\list.pl').
% here _______________________↑
© www.soinside.com 2019 - 2024. All rights reserved.