Odd existence error for the (;)/2 control construct
See original GitHub issueWith the following code (in a consulted source file):
logtalk_library_path(logtalk_home, '$LOGTALKHOME/').
% Logtalk user directory
logtalk_library_path(logtalk_user, '$LOGTALKUSER/').
% user home directory
logtalk_library_path(home, HOME) :-
( getenv('HOME', _) ->
% likely a POSIX system but Windows users
% may also define this environment variable
HOME = '$HOME/'
; getenv('USERPROFILE', _) ->
% Windows systems define this environment variable
HOME = '$USERPROFILE/'
; fail
).
And with the query:
logtalk_library_path(Library,_).
I get:
$ node ./tp.js
Library = logtalk_home ;
Library = logtalk_user ;
uncaught exception: error(existence_error(procedure, /(;, 2)), /(logtalk_library_path, 2))
false.
The file compiles fine without any warnings or errors in the sandbox in the Tau Prolog website.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
MySQL Stored Procedure - w3resource
In the following procedure, a user passes a number through IN parameter and make a sum of odd numbers between 1 and that...
Read more >Auditing Standard No. 13 - PCAOB
Introduction. 1. This standard establishes requirements regarding designing and implementing appropriate responses to the risks of material misstatement.
Read more >error 183 cannot create a file when that file already exists
S. delete sslcertWinerror 183 Cannot create a file when that file already exists. But getting error:- EXECUTE master. 1 EXECUTE master.
Read more >GNU make
GNU make. This file documents the GNU make utility, which determines automatically which pieces of a large program need to be recompiled, ...
Read more >Sample PL/SQL Programs
A Sample PL/SQL Programs. This appendix provides several PL/SQL programs to guide you in writing your own. The sample programs illustrate several important ......
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
Found the cause. Changing the code above by commenting the last
require
:Allows the query to give all expected answers.
Thanks for the quick reply. Closing.