Christian Cleber Masdeval Braz - DATAPREVMS wrote: > > Hi, > > i need to pass a long C type variable to the is/2 predicate. I make > the method table whose set method is > > int set(t_ext_ptr obj, int idx, pword data) > { > long x; > EC_word y(data). > y.is_long(&x); > *((long*)obj) = x; > > return 0; > } > > Then i submit the following goal > > long x; > post_goal(term(EC_functor("is",2)handle(&ec_xt_long,&x),20)); > > EC_resume(); > > cout << x; > > What i expect is the assign of 20 to the C variable, but the error > > " type error in is 20 in module eclipse' > > is occurring. The left hand side of is/2 cannot be a handle, it must be a variable or a number. The only way to invoke the set-method from Eclipse code is via the xset/3 or the setarg/3 builtin. -- Joachim Schimpf / phone: +44 20 7594 8187 IC-Parc / mailto:J.Schimpf@imperial.ac.uk Imperial College London / http://www.icparc.ic.ac.uk/eclipseReceived on Mon Apr 19 10:30:33 2004
This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:28 PM GMT GMT