J. Manuel Velasco wrote: > ... > post_goal(term(EC_functor("es_hermano",2), "daniel", Result)); This is equivalent to the query ?- es_hermano("daniel", Result). which fails because daniel \= "daniel" (one is an atom, the other one a string type). You'd have to write instead post_goal(term(EC_functor("es_hermano",2), EC_atom("daniel"), Result)); > { > long i; > if (EC_word(Result).is_long(&i) == EC_succeed) > cout << i << "\n"; > else > cout << "unexpected result type"; > } Because you are now expecting Result to be an atom, you have to change this code accordingly, e.g. { EC_atom a; if (EC_word(Result).is_atom(&a) == EC_succeed) cout << a.name() << "\n"; else cout << "unexpected result type"; } -- JoachimReceived on Fri Nov 03 2006 - 11:30:33 CET
This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:57 CET