error c504
Posted: 23 Feb 2014 18:16
hi
i write a program for finding path but received error message please help me ?
error :
i write a program for finding path but received error message please help me ?
Code: Select all
predicates
findPath : (string Start, string End) -> string* Path determ.
clauses
findPath(Start, End) = list::reverse(findPath2(Start, End, [Start])).<<<<<error
predicates
findPath2 : (string Start, string End, string* PathSoFar) -> string Path determ.
clauses
findPath2(C, C, PathSoFar) = [C|PathSoFar] :-<<<<<error
!.
findPath2(A, C, PathSoFar) = Path :-
edge(A, B),
not(list::isMember(B, PathSoFar)),
Path = findPath2(A, B, [B|PathSoFar]),
!.
Code: Select all
Network.pro(47,38) error c504: The expression has type '::string', which is incompatible with the type '::string*'
Network.pro(49,34) error c504: The expression has type 'a$*', which is incompatible with the type '::string'