Re: Ann: SWI-Prolog 6.5.3
Paulo Moura <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
Hi Richard, On 21/11/2013, at 03:05, Richard A. O'Keefe <[email protected]> wrote: > What I _want_ is to be able to declare in a source file what > syntax settings that file is to be processed with *without* any > effect on run time. Is that possible? One possible way to do it would be to change the semantics of the set_prolog_flag/2 *directive* to be local to a source file. The programmer could use the set_prolog_flag/2 *predicate* (called from an initialization/1 directive) if the effects of change should affect the runtime (*). But these would likely break backwards compatibility and the necessity of it is mitigated by using the set_prolog_flag/2 directive within a module (thus making it local to the module, not to the file; but given that a source file can only contain a single module definition...). (*) Logtalk uses this distinction/semantics for its set_logtalk_flag/2 directive. Cheers, Paulo ----------------------------------------------------------------- Paulo Moura Logtalk developer Email: <mailto:[email protected]> Web: <http://logtalk.org/> -----------------------------------------------------------------