Re: Calling Eclipse functions from C++

From: Joachim Schimpf <j.schimpf_at_icparc.ic.ac.uk>
Date: Wed 06 Jul 2005 10:08:25 AM GMT
Message-ID: <42CBAD99.1090905@icparc.ic.ac.uk>
Joachim Schimpf wrote:
> Upper-case identifiers in ECLiPSe (and Prolog) always denote
> variables, therefore you will have to quote your filename if
> it begins with and upper case letter. Either single quotes or
> double quotes will do in this case, i.e. you have to write
> either
>     post_goal("compile('CLP_predicates')");
> or
>     post_goal("compile(\"CLP_predicates\")");


An even better solution (to this and similar problems) is to completely
avoid assembling a string, and instead build a compound term as the goal:

      post_goal(term(EC_functor("compile",1),"CLP_predicates"));



-- 
  Joachim Schimpf              /             phone: +44 20 7594 8187
  IC-Parc                     /      mailto:J.Schimpf@imperial.ac.uk
  Imperial College London    /    http://www.icparc.ic.ac.uk/eclipse
Received on Wed Jul 06 11:10:33 2005

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