[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GNU Prolog 1.4.5 under Linux
From: |
Sergey S. Kumkov |
Subject: |
GNU Prolog 1.4.5 under Linux |
Date: |
Mon, 24 Sep 2018 12:19:44 +0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
Linux serge-note 4.15.0-34-generic #37-Ubuntu SMP Mon Aug 27 15:21:48
UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
(actually, kubuntu 18.04.1, if it is important)
GNU Prolog 1.4.5 (64 bits)
Compiled Feb 5 2017, 10:30:08 with gcc
By Daniel Diaz
Copyright (C) 1999-2016 Daniel Diaz
(installed from repositories by apt)
--------- max1.pro --------------
mmax(X,Y,Z) :- X > Y -> Z = X.
mmax(_,Y,Y).
---------------------------------
---------------------------------
address@hidden:~/Programming/Prolog$ gprolog
GNU Prolog 1.4.5 (64 bits)
Compiled Feb 5 2017, 10:30:08 with gcc
By Daniel Diaz
Copyright (C) 1999-2016 Daniel Diaz
| ?- ['max1'].
compiling /home/serge/Programming/Prolog/max1.pro for byte code...
/home/serge/Programming/Prolog/max1.pro compiled, 2 lines read - 735
bytes written, 12 ms
yes
| ?- listing.
% file: /home/serge/Programming/Prolog/max1.pro
mmax(A, B, C) :-
( A > B ->
C = A
).
mmax(_, A, A).
yes
| ?- mmax(1,2,R).
uncaught exception:
error(existence_error(procedure,'$mmax/3_$aux1'/0),mmax/0)
---------------------------------
Why does the interpreter not find an existing preicate?
Sincerely your, Sergey Kumkov
------------------------------
address@hidden
ICQ UIN 8418050
Skype: sskumk
mobile: +7(922)2057287
------------------------------
- GNU Prolog 1.4.5 under Linux,
Sergey S. Kumkov <=