On executing the following query in prolog :-
split_string("/usr/local/eclipse", "/", "", [H|T]), split_string(T, "", "", X), write(X)
The error is
ERROR: split_string/4: Type error: `character_code' expected, found `"usr"' (a string)
I am not able to resolve it. Please help!.
String variable in
split_string(+String, +SepChars, +PadChars, -SubStrings)
is intended to containt list of charcodes. In your exampleSo T is a list of lists of charcodes. That's why there is an error in the next part of your query:
I don't know what your code is intended to do, so I can't propose a way to fix your code.