sub_atom implementation



Hi All!
I am using SWI Prolog. I have two issues regarding sub_atom/5 predicate.

First, is it convenient to use it or it is better to use difference list (in
terms of speed).
Does it depends on the implementation I use?

Second, as a declarative language Prolog allow to "say what you want" and
not "how".
Is it possible to say sub_atom/5 that I want first longer sub atoms without
tailoring a new predicate?

Thanks in advance.

M


.



Relevant Pages

  • Re: Could not load foreign predicates in SWI Prolog 5.6.
    ... > foregin predicate (in C language) and use it in SWI Prolog. ... > into the prolog interpreter, ...
    (comp.lang.prolog)
  • Could not load foreign predicates in SWI Prolog 5.6.
    ... foregin predicate (in C language) and use it in SWI Prolog. ... into the prolog interpreter, then load_foreign_librarycall doesnt ...
    (comp.lang.prolog)
  • Dynamic construction of variables from strings
    ... domain specific language to Prolog goals which are then executed using ... according to the SWI Prolog manual, will unify Goal with foo. ... My problem is that foo, hello and X must be constructed dynamically ... be accomplished using the atom_chars predicate. ...
    (comp.lang.prolog)
  • arithmetic_function (SWI)
    ... This is an issue regarding arithmetic_function/1 predicate under SWI Prolog. ... Suppose I define a new arithmetic function, namely a constant c/0, in this ... So it seems that predicate e/1 associated with arithmetic function e/0 it is ...
    (comp.lang.prolog)