mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-25 14:28:05 +02:00
Prolog-Beispiel
This commit is contained in:
parent
45b2c7a71c
commit
7d278dd745
5 changed files with 31 additions and 0 deletions
11
documents/Programmierparadigmen/scripts/prolog/human-2.sh
Normal file
11
documents/Programmierparadigmen/scripts/prolog/human-2.sh
Normal file
|
@ -0,0 +1,11 @@
|
|||
$ ./a.out
|
||||
Welcome to SWI-Prolog (Multi-threaded, 32 bits, Version 5.10.4)
|
||||
Copyright (c) 1990-2011 University of Amsterdam, VU Amsterdam
|
||||
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free
|
||||
software, and you are welcome to redistribute it under certain
|
||||
conditions. Please visit http://www.swi-prolog.org for details.
|
||||
|
||||
For help, use ?- help(Topic). or ?- apropos(Word).
|
||||
|
||||
?- human(socrates).
|
||||
true.
|
3
documents/Programmierparadigmen/scripts/prolog/human.pro
Normal file
3
documents/Programmierparadigmen/scripts/prolog/human.pro
Normal file
|
@ -0,0 +1,3 @@
|
|||
human(bob).
|
||||
human(socrates).
|
||||
human(antonio).
|
6
documents/Programmierparadigmen/scripts/prolog/human.sh
Normal file
6
documents/Programmierparadigmen/scripts/prolog/human.sh
Normal file
|
@ -0,0 +1,6 @@
|
|||
$ swipl -c human.pro
|
||||
% library(swi_hooks) compiled into pce_swi_hooks
|
||||
% 0.00 sec, 2,224 bytes
|
||||
% human.pro compiled 0.00 sec, 644 bytes
|
||||
% /usr/lib/swi-prolog/library/listing compiled into
|
||||
% prolog_listing 0.00 sec, 21,648 bytes
|
Loading…
Add table
Add a link
Reference in a new issue