next up previous index
Next: Utility Libraries Up: Libraries Previous: Scattered   Index

Subsections


SICStus Prolog Compatibility Package

ECLiPSe includes a SICStus Prolog compatibility package to ease the task of porting SICStus Prolog applications to ECLiPSe Prolog. This package includes the C-Prolog compatibility package (see Appendix A.6) and the Quintus-Prolog compatibility package (see Appendix A.11).

Please note that this appendix does not detail the functionality of SICStus Prolog, refer to the SICStus Prolog documentation for this information.

Using the SICStus Prolog compatibility package

The SICStus Prolog compatibility package can be accessed by issuing the directive

:- use_module(library(sicstus)).
The effect of the compatibility library is local to the module where it is loaded (except for the redefinition of some global event handlers). The directive must therefore be given in every module that wants to use the compatibility mode.

The SICStus compatibility predicates

The following predicates are available (in addition the the ones from the quintus library):

block/1

call_residue/2
This is only approximate, the variables in the second argument are dummies.

dif/2

fcompile/1

freeze/2

frozen/2

load/1

module/2

on_exception/3

raise_exception/1

when/2

Sockets library

A sockets library is provided for compatibility with the sockets manipulation predicates of SICStus. To use these predicates, the sockets library has to be loaded:

:- use_module(library(sockets)).

For SICStus 3.0, the sockets predicates are also in a sockets library, so no changes are needed to load the library. However, for older versions of SICStus, the predicates are available as built-ins, and no library has to be loaded. So if the code is written for older versions of SICStus, then the above line has to be added.

The sockets library can be used independently of the sicstus library. Note also that ECLiPSe also provides its own socket manipulation predicates (see Chapter 21) that provides similar functionalities to the sockets library.

All the predicates in SICStus' socket library are supported:

socket/2

socket_bind/2

socket_connect/3

socket_listen/2

socket_accept/2

socket_select/5

current_host/1
This does not attempt to always return the qualified name of the host machine.

stream_select/3

This is a built-in for SICStus, and not part of its socket library. It is currently supported in ECLiPSe as part of the sockets library.

Syntax differences

Since the SICStus package contains the Quintus one, the syntax differences are the same, see Section A.11.3.


next up previous index
Next: Utility Libraries Up: Libraries Previous: Scattered   Index

1999-08-06