Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!Germany.EU.net!Munich.Germany.EU.net!ecrc!news
From: joachim@ecrc.de (Joachim Schimpf)
Subject: Re: dynamic/multifile in ECLiPSe, Quintus
Message-ID: <Czrusq.2H4@ecrc.de>
Sender: news@ecrc.de
Reply-To: joachim@ecrc.de
Organization: European Computer-industry Research Centre GmbH, Munich, Germany
References: <3aqqju$pu7@lightning.ditc.npl.co.uk>
Date: Thu, 24 Nov 1994 12:31:37 GMT
Lines: 31

In article pu7@lightning.ditc.npl.co.uk, rss@seg.npl.co.uk (Roger Scowen) writes:
>Robert F. Staerk wrote (message <staerk-1611941246520001@math-mac-staerk.stanford.edu>):
>
>> [...]
>> Now the program does not work in Sicstus and Eclipse. 
>> [...]
>
>Quintus Prolog is conforming (at least in this respect) with
>the Draft International Standard for Prolog (ISO/IEC DIS 13211-1)
>which states (clause 7.4.2.1):
>   The first directive 'dynamic/1' that specifies a user-defined procedure 
>   'P' to be dynamic shall precede all clauses for 'P'.  Further, 
>   if 'P' is defined to be a dynamic procedure in one Prolog text, 
>   then a directive 'dynamic(PP)' that indicates 'P' shall occur 
>   in every Prolog text which contains clauses for 'P'.
>

Hint for ECLiPSe users: When eclipse encounters a subsequent dynamic
declaration for a predicate that is already dynamic, it raises an
"alreeady dynamic" event and the default event handler retracts all
clauses. You can change this behaviour (and conform to the standard :-)
by setting the handler to true/0:

:- set_error_handler(64, true/0).

---------------------------------------------------------------------------
 Joachim Schimpf                                 Email   joachim@ecrc.de 
 European Computer-Industry Research Centre      Phone   +49 89 92699 111
 Arabellastrasse 17, D-81925 Munich, Germany     Fax     +49 89 92699 170


