next up previous index
Next: Syntax differences Up: C-Prolog Compatibility Package Previous: C-Prolog Predicates not

Differences Between C-Prolog and ECLiPSe

The following differences remain even with the compatibility package:

Database References

ECLiPSe provides database references only for terms in the indexed database, not for program clauses.

Numbers

C-Prolog has a tendency to ``prefer'' integers over real numbers. For instance, under C-Prolog when the call X is 4.0/2.0 is made, X is instantiated to an integer. This behaviour does not occur in ECLiPSe . The order of integers and reals in the standard order is different.

Operators

In C-Prolog there is a bug regarding the operator not --- it binds closer than its precedence declaration.

Strings

Strings are simulated in C-Prolog by lists. Under C-Prolog mode, ECLiPSe provides this functionality --- double-quoted strings are parsed as lists of integers. This can cause confusion when pure ECLiPSe predicates are used in C-Prolog mode, e.g. substring/3 will not accept double-quoted items, since they are lists, not ECLiPSe strings. The built-in string_list/2 converts between both representations.



Micha Meier
Mon Mar 4 12:11:45 MET 1996