bad result of The list::remove predicate in a dll
Posted: 24 Sep 2014 13:10
Hi,
I got a problem with the list::remove predicate in a dll.
it's easy to reproduce : modify the code of dll.pro in the Visual prolog Examples as described below :
The result is :
Hello World - ["a","b"] , ["a","b","c"]
If we run the two predicates checkABC and checkABC1 in a console or a GUI project, the result is right :
["a","b"] in the two cases.
I got a problem with the list::remove predicate in a dll.
it's easy to reproduce : modify the code of dll.pro in the Visual prolog Examples as described below :
Code: Select all
implement myDll
open core, string, list
clauses
touch(String) = string::concat(String, Added):-
L = checkABC(),
L1 =checkABC1(),
Added = string::format(" - % , %", toString(L), toString(L1)).
class predicates
checkABC : () -> string_list NList.
checkABC1 : () -> string_list NList.
clauses
checkABC() = Liste :-
L = remove(["a", "b", "c"], "c"),
Liste = L.
checkABC1() = Liste :-
Liste = remove(["a", "b", "c"], "c").
end implement myDll
Hello World - ["a","b"] , ["a","b","c"]
If we run the two predicates checkABC and checkABC1 in a console or a GUI project, the result is right :
["a","b"] in the two cases.