Passing a long C type by a handle

From: Christian Cleber Masdeval Braz - DATAPREVMS <christian.braz_at_previdencia.gov.br>
Date: Fri 16 Apr 2004 10:48:44 PM GMT
Message-ID: <7ADACC016F363D4E8A140E631B3246F10A8B62C9@wtrjo098>
  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.
 
    Best regards, 
 
    Christian
    
 
 
Received on Fri Apr 16 23:55:41 2004

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:28 PM GMT GMT