인쇄하려면 어떻게 해야 하나 이 문자열에서 프롤로그에서 가장 좋은 방법:
predicate([], L, Id, L2):-
length(L2, N),
write('The length '),
write(Id),
write(' is '),
write(N),
write(' elements.'),
nl.
인쇄하려면 어떻게 해야 하나 이 문자열에서 프롤로그에서 가장 좋은 방법:
predicate([], L, Id, L2):-
length(L2, N),
write('The length '),
write(Id),
write(' is '),
write(N),
write(' elements.'),
nl.
에 SWI-프롤로그,사용할 수 있습니다 내에서 조건부 형식을/2:
predicate([], L, Id, L2):-
length(L2, N),
format('The length of ~w is ~w elements\n', [Id, N]).