Pop-Up Thingie
Sidebar
>>> Magnum BBS <<<
Home
Forum
Files
Dark
Log in
Username
Password
Sidebar
Forum
Usenet
COMP.LANG.PROLOG
nephew(N) ............... almost as powerful as prolog
From
Graham Cooper
@21:1/5 to
All
on Sun Feb 19 15:36:48 2023
TRYING OUT ALL VALUES to get a true result is the HEART of PROLOG
Here we do it in an imperative language with small code
nephew3 brad [?]
YES
nelly nellyson
--------------------------- TRACE --------------------
4 nephew3 brad
P=brad
nephew3 brad
4 1 sibling P A
6 sibling brad A
A=mary
sibling brad mary
4 2 if
4 3 kid A B
4 8 clear A
4 9 clear B
4 10 next
4 11 nephew3 P
4 nephew3 brad
P=brad
nephew3 brad
4 1 sibling P A
7 sibling brad A
A=nelly
sibling brad nelly
4 2 if
4 3 kid A B
10 kid nelly B
B=nellyson
kid nelly nellyson
4 4 print A
4 5 print B
4 6 echo newline
4 7 endif
4 8 clear A
4 9 clear B
4 10 next
4 11 nephew3 P
4 nephew3 brad
P=brad
nephew3 brad
4 1 sibling P A
-------------------------- CODE -------------------------
THIS IS LIKE
nephew(N K)
:-
sibling(N A)
kid(A K)
------
nephew3 P
-sibling P A
-if
-kid A B
-print A
-print B
-echo newline
-endif
-clear A
-clear B
-next
-nephew3 P
sibling alan zeta
sibling brad mary
sibling brad nelly
sibling carl tom
kid alan joe
kid nelly nellyson
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)
Who's Online
Recent Visitors
Centurion
Sat Jun 14 09:29:30 2025
from
Berea, Ohio
via
Telnet
Plume
Sat Jun 14 05:15:48 2025
from
Uk
via
SSH
Centurion
Sat Jun 14 04:44:25 2025
from
Berea, Ohio
via
Telnet
Centurion
Sat Jun 14 03:55:25 2025
from
Berea, Ohio
via
Telnet
Adam Fancher
Fri Jun 13 23:00:16 2025
from
Winsted, Ct
via
Telnet
Plume
Fri Jun 13 22:17:22 2025
from
Uk
via
SSH
Centurion
Fri Jun 13 18:58:14 2025
from
Berea, Ohio
via
Telnet
Bob Worm
Fri Jun 13 10:37:24 2025
from
Wales, Uk
via
Telnet
System Info
Sysop:
Keyop
Location:
Huddersfield, West Yorkshire, UK
Users:
491
Nodes:
16 (
2
/
14
)
Uptime:
147:03:06
Calls:
9,694
Calls today:
4
Files:
13,732
Messages:
6,178,670