[m-dev.] :- external directive

James Goddard goddardjames at yahoo.com
Wed Dec 10 11:31:23 AEDT 2003


Hello out there,

Can anyone explain to me what the "external" directive
does in the following code fragment?  It doesn't
appear to be in the documentation.

(from library/builtin.m:431)

%-----------------------------------------------------------------------------%

:- external(unify/2).
:- external(compare/3).
:- external(compare_representation/3).

ordering(X, Y) = R :-
        compare(R, X, Y).

        % simplify__goal automatically inlines these
definitions.
        %
X  @< Y :- compare((<), X, Y).
X @=< Y :- not compare((>), X, Y).
X @>  Y :- compare((>), X, Y).
X @>= Y :- not compare((<), X, Y).

%-----------------------------------------------------------------------------%

Cheers,

James

http://personals.yahoo.com.au - Yahoo! Personals
New people, new possibilities. FREE for a limited time.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list