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
Fred Blogs
Sun Nov 1 01:53:36 2026
from
Uk
via
SSH
Rixter
Sat Oct 31 23:01:35 2026
from
Madison, Nc
via
Telnet
Bob Worm
Sat Oct 31 21:42:41 2026
from
Wales, Uk
via
Telnet
Amstrad Ppc
Sat Oct 31 19:07:41 2026
from
Wiltshire
via
Telnet
Amstrad Ppc
Sat Oct 31 17:11:55 2026
from
Wiltshire
via
Telnet
Ashenfieldx
Sat Oct 31 16:47:35 2026
from
Guelph, Ontario
via
Telnet
Amstrad Ppc
Sat Oct 31 16:34:27 2026
from
Wiltshire
via
Telnet
Amstrad Ppc
Sat Oct 31 15:21:38 2026
from
Wiltshire
via
Telnet
System Info
Sysop:
Keyop
Location:
Huddersfield, West Yorkshire, UK
Users:
796
Nodes:
16 (
2
/
14
)
Uptime:
158:07:06
Calls:
13,194
Calls today:
1
Files:
15,485
Messages:
6,579,424