joins several strings
INCLUDE 'prolib.h' conlist([Str1,Str2,StrN],ResultStr)
conlist( Strings,ResultStr)(i,x)
stringlist(Strings) (i) A list of strings to be joined
string(ResultStr) (x) A string built by the ones of Strings
Joins several strings to one. Each element of stringlist must be bound to a
string.
Its definition is:
PREDICATE conlist(stringlist,string). conlist([],""):-!. conlist([Str],Str):-!. conlist([Str1,Str2],Res):- concat(Str1,Str2,Res),!. conlist([H|T],Res):- conlist(T,Temp), concat(H,Temp,Res).
conlist(["Hello"," World","!\n"), write(X).
A runtime error occurs if the arguments are bound to something other than strings.
prolog-process, client-server, object