consult doesn't call initialization/1 directive goals
See original GitHub issuethe consult
JavaScript function doesn’t call initialization/1
directive goals. For example, with:
session.consult( ":- initialization(write(hello))." );
session.query( "true." );
session.answers( x => console.log( pl.format_answer(x) ) );
we get:
$ node ./tp.js
true ;
false.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:32 (21 by maintainers)
Top Results From Across the Web
Calling predicate at the begining of the run - Stack Overflow
A special directive is initialization/1: Call Goal after loading the source file in which this directive appears has been completed.
Read more >(initialization)/1 - SWI-Prolog
This means that arbitrary goals can only be called from a directive by means of the initialization/1 directive. SWI-Prolog does not enforce this...
Read more >multiple files in GNU Prolog? - Google Groups
My understanding is that I am not using Prolog modules, and that SWI Prolog's multifile directive permits non-contiguous use of predicates,. :- multifile([ ......
Read more >Simple term_expansion debugging - Nice to know - SWI-Prolog
When a term passes through term_expansion/2 trying to debug/understand the term expansion can be challenging at first. One effective aid in ...
Read more >Top 18 Most Common AngularJS Developer Mistakes - Toptal
debugInfoEnabled is set to false, calling .scope() on a DOM node will return undefined . That is one of the few recommended options...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Great! Please feel free to add the header that you consider appropriate. You can distribute it under the same Logtalk license.
This (d84181b) is the last major change in the Tau Prolog interface.
Thread.prototype.query
becomes asynchronous due to goal expansion. @pmoura Hopefully this is the last change for your script: 😄