String Handling in Java -


i need add 1 more predicate no_car(x),that true if worker x has no cars,i.e,if input query ?:- no_car(x). prolog should answer

since using swi-prolog, can use string-based functionality:

word_four_last_two(two) :-     read_string(user_input, "\n", "\r", _, string),     split_string(string, " ", " ", [_,_,_,word4|_]),     sub_string(word4, _, 2, 0, two). 

Comments

Popular posts from this blog

ruby - How do I merge two hashes into a hash of arrays? -

java - the value of local variable is not used -