,,,
Domains
N,i,n,y,m,d,t,v,p=integer
database -svod1
svod1(n,y,m,d,t,v,p)
database -lolo
lolo(n,y,m,d,t,v,p)
database -kuku
kuku(n,y,m,d,t,v,p)
database
svod(n,y,m,d,t,v,p)
Predicates
start
patch
load
select(i)
sel(i,i)
process(i)
procedure(i)
sve(i)
lod(i)
repeat
goal
start.
Clauses
/* */
start:-
makewindow(1,2,7,"C ",0,0,25,80),
clearwindow,
load,
patch.
/* */
patch:-
repeat,
cursor(7,0),
write(" 0 - pp... "),nl,
write(" 1 - "),nl,
write(" 2 - "),nl,
write(" 3 - "),nl,
write(" 4 - "),nl,
write(" 5 - "),nl,
write(" 6 - "),nl,
write(" 7 - "),nl,
write(" 8 - -"),nl,
write(" 9 - "),nl,
write(" =>"),
readint(Choice),
Choice >= 0,
Choice < 10,
clearwindow,
process(Choice),
clearwindow,
Choice = 9,
retractall(_),
removewindow.
/* */
load:-
existfile("lesha.dat"),
consult("lesha.dat"),
cursor(1,2),
write(" ").
load:-
cursor(1,2),
write(" ").
/*pp */
process(7):-
makewindow(1,2,7," ",0,0,25,80),
nl,
write(" :"),readint(N),nl,
write(" 䠠 :"),readint(Y),nl,
write(" :"),readint(M),nl,
write(" :"),readint(D),nl,
write(" :"),readint(T),nl,
write(" :"),readint(V),nl,
write(" 堠 :"),readint(P),nl,
assertz(svod(N,Y,M,D,T,V,P)),
removewindow,
fail.
/* -*/
process(8):-
makewindow(1,2,7,"-",0,0,25,80),
nl,
write(" :"),readint(A),nl,nl,
svod(A,Y,M,D,T,V,P),
write(" :"),write(A),nl,
write("䠠 :"),write(Y),nl,
write(" :"),write(M),nl,
write(" :"),write(D),nl,
write(" :"),write(T),nl,
WRITE(" :"),write(V),nl,
write("堠 :"),write(P),nl,nl,nl,
write(" "),
readchar(_),
removewindow,
!.
process(8):-
write(" ."),
write(" "),nl,nl,nl,
write(" :"),
readint(N),nl,
write(" 䠠 :"),readint(Y),nl,
write(" :"),readint(M),nl,
write(" :"),readint(D),nl,
write(" :"),readint(T),nl,
write(" :"),readint(V),nl,
write(" 堠 :"),readint(P),
assertz(svod(N,Y,M,D,T,V,P)),
removewindow,
fail.
process(0):-
makewindow(1,2,7," pp...",0,0,25,80),
write(" p-p "),nl,nl,
write(" o "),nl,nl,
write(" -TURBO-PROLOG v.2.0. "),nl,nl,
write(" p: .. "),nl,nl,
write(" , p.-1-95 () 1996 . "),nl,nl,nl,nl,
write(" "),
readchar(_),
removewindow.
/* */
process(1):-
makewindow(1,2,7,"pp ",0,0,25,80),
nl,
select(N),
X=N,
svod(X,Y,M,D,T,V,P),
write(" 蠠 :"),write(N),nl,
write("䠠 :"),write(Y),nl,
write(" :"),write(M),nl,
write(" :"),write(D),nl,
write("ࠠ :"),write(T),nl,
write(" :"),write(V),nl,
write("堠 :"),write(P),nl,nl,nl,
write(" 䠠 :"),readint(Y1),nl,
write(" :"),readint(M1),nl,
write(" :"),readint(D1),nl,
write(" :"),readint(T1),nl,
write(" :"),readint(V1),nl,
write(" 堠 :"),readint(P1),nl,
X1=X,
retract(svod(X,Y,M,D,T,V,P)),
assert(svod(X1,Y1,M1,D1,T1,V1,P1)),
!,
removewindow.
/* */
process(2):-
makewindow(1,2,7," ",0,0,25,80),
nl,
select(N),
X=N,
svod(X,Y,M,D,T,V,P),
retract(svod(X,Y,M,D,T,V,P)),!,
removewindow.
/* */
process(3):-
makewindow(1,2,7,"p ",0,0,25,80),
nl,
write("╔════════════════════════════════════════════════════════════════════╗"),nl,
write("║ ۠ ║"),nl,
write("║ ║"),nl,
write("╠═══════╦═══════════════════════╦══════════╦════════════╦════════════╣"),nl,
write("║ ║ ࠠ ║ - ║ ║堠 ║"),nl,
write("║ ╠═══════╦════════╦══════╬══════════╬════════════╬════════════╣"),nl,
write("║ ║ 䠠 ║ ║ ║ ║ ║ ║"),nl,
write("║ ║ ║ ║ ║ ║ ║ ║"),nl,
write("║ ║ ║ ║ ║ ║ ║ ║"),nl,
nl,
svod(N,Y,M,D,T,V,P),
cursor(Z,_),
cursor(Z,2),write(N),
cursor(Z,11),write(Y),
cursor(Z,20),write(M),
cursor(Z,29),write(D),
cursor(Z,36),write(T),
cursor(Z,47),write(V),
cursor(Z,60),write(P),
cursor(Z,66),write("|"),
nl,
fail.
process(3):-
write("----------------------------------------------------------------------"),
nl,
write(" "),
readchar(_),
removewindow.
/* */
process(4):-
nl,
makewindow(2,15,4,"",5,5,20,70),
write("1 - "),nl,
write("2 - lesha.dat"),nl,
write("3 - "),nl,
write("==>"),
readint(C),
C>0,C<4,
lod(C),
!,
removewindow.
/* */
process(5):-
nl,
makewindow(2,15,4,"",5,5,20,70),
write("1 - "),nl,
write("2 - lesha.dat"),nl,
write("3 - "),nl,
write("==>"),
readint(I),
I>0,I<4,
sve(I),!,
removewindow.
/* */
process(6):-
nl,
makewindow(3,2,7," ",0,0,25,80),
write("1 - "),nl,
write("2 - "),nl,
write("3 - "),nl,
write("4 - "),nl,
write("==>"),
readint(O),
O>0,O<5,
procedure(O),
removewindow.
process(_).
/* */
procedure(1):-
makewindow(1,2,7," ",0,0,25,80),
nl,
cursor(7,10),
retractall(_,svod1),
nl,
write(" , "),
nl,
write(" :"),
readint(X),
svod(N,Y,M,D,T,V,P),
S=Y,
S=X,
N1=N,M1=M,D1=D,T1=T,V1=V,P1=P,
assert(svod1(N1,Y,M1,D1,T1,V1,P1)),
fail.
procedure(1):-
write(" "),nl,
write("╔════════════════════════════════════════════════════════════════════╗"),nl,
write("║ ۠ ║"),nl,
write("║ ║"),nl,
write("╠═══════╦═══════════════════════╦══════════╦════════════╦════════════╣"),nl,
write("║ ║ ࠠ ║ - ║ ║堠 ║"),nl,
write("║ ╠═══════╦════════╦══════╬══════════╬════════════╬════════════╣"),nl,
write("║ ║ 䠠 ║ ║ ║ ║ ║ ║"),nl,
write("║ ║ ║ ║ ║ ║ ║ ║"),nl,
write("║ ║ ║ ║ ║ ║ ║ ║"),nl,
nl,
svod1(N,S,M,D,T,V,P),
cursor(Z,_),
cursor(Z,2),write(N),
cursor(Z,11),write(S),
cursor(Z,20),write(M),
cursor(Z,29),write(D),
cursor(Z,36),write(T),
cursor(Z,47),write(V),
cursor(Z,60),write(P),
nl,
fail.
procedure(1):-
write("-------------------------------------------------------------------"),
save("not.dat",svod1),
nl,
write(" not.dat"),
nl,
write(" "),
readchar(_),
removewindow,
!.
procedure(1):-
write("-------------------------------------------------------------------"),
nl,
write(" "),
nl,
write(" "),
readchar(_),
makewindow(1,2,7," ",0,0,25,80).
procedure(2):-
makewindow(1,2,7," ",0,0,25,80),
nl,
cursor(7,10),
retractall(_,lolo),
nl,
write(" , "),nl,
readint(X),
svod(N,Y,M,D,T,V,P),
S=M,
S=X,
N1=N,Y1=Y,D1=D,T1=T,V1=V,P1=P,
assert(lolo(N1,Y,S,D,T,V,P)),
fail.
procedure(2):-
write(" "),nl,
write("╔════════════════════════════════════════════════════════════════════╗"),nl,
write("║ ۠ ║"),nl,
write("║ ║"),nl,
write("╠═══════╦═══════════════════════╦══════════╦════════════╦════════════╣"),nl,
write("║ ║ ࠠ ║ - ║ ║堠 ║"),nl,
write("║ ╠═══════╦════════╦══════╬══════════╬════════════╬════════════╣"),nl,
write("║ ║ ║ ║ ║ ║ ║ ║"),nl,
write("║ ║ ║ ║ ║ ║ ║ ║"),nl,
write("║ ║ ║ ║ ║ ║ ║ ║"),nl,
nl,
lolo(N,Y,M,D,T,V,P),
cursor(Z,_),
cursor(Z,2),write(N),
cursor(Z,11),write(Y),
cursor(Z,20),write(M),
cursor(Z,29),write(D),
cursor(Z,36),write(T),
cursor(Z,47),write(V),
cursor(Z,60),write(P),
nl,
fail.
procedure(2):-
write("-----------------------------------------------------------------------------"),
save("not1.dat",lolo),
nl,
write(" not1.dat"),
nl,
write(" "),
readchar(_),
removewindow,
!.
procedure(2):-
write("-------------------------------------------------------------------"),
nl,
write(" "),
nl,
write(" "),
readchar(_),
makewindow(1,2,7," ",0,0,25,80).
procedure(3):-
makewindow(1,2,7," ",0,0,25,80),
nl,
cursor(7,10),
retractall(_,kuku),
nl,
write(" , "),
nl,
write(" :"),
readint(X),
svod(N,Y,M,D,T,V,P),
S=D,
S=X,
N1=N,Y1=Y,M1=M,T1=T,V1=V,P1=P,
assert(kuku(N1,Y1,M1,S,T1,V1,P1)),
fail.
procedure(3):-
write(" "),nl,
write("╔════════════════════════════════════════════════════════════════════╗"),nl,
write("║ ۠ ║"),nl,
write("║ ║"),nl,
write("╠═══════╦═══════════════════════╦══════════╦════════════╦════════════╣"),nl,
write("║ ║ ࠠ ║ - ║ ║堠 ║"),nl,
write("║ ╠═══════╦════════╦══════╬══════════╬════════════╬════════════╣"),nl,
write("║ ║ 䠠 ║ ║ ║ ║ ║ ║"),nl,
write("║ ║ ║ ║ ║ ║ ║ ║"),nl,
write("║ ║ ║ ║ ║ ║ ║ ║"),nl,
nl,
kuku(N,Y,M,D,T,V,P),
cursor(Z,_),
cursor(Z,2),write(N),
cursor(Z,11),write(Y),
cursor(Z,20),write(M),
cursor(Z,29),write(D),
cursor(Z,36),write(T),
cursor(Z,47),write(V),
cursor(Z,60),write(P),
nl,
fail.
procedure(3):-
write("-------------------------------------------------------------------"),
save("not2.dat",kuku),
nl,
write(" not.dat"),
nl,
write(" "),
readchar(_),
removewindow,
!.
procedure(3):-
write("-------------------------------------------------------------------"),
nl,
write(" "),
nl,
write(" "),
readchar(_),
makewindow(1,2,7," ",0,0,25,80).
/* */
sve(1):-
write(" :"),
readln(N),
save(N),
write(" "),
beep,
!.
sve(1):-
write(" , "),
readchar(_).
sve(2):-
save("lesha.dat").
sve(3).
/* */
lod(1):-
retractall(_),
write(" :"),
readln(N),
existfile(N),
consult(N),
write(" "),
beep,
!.
lod(1):-
nl,
write(" "),nl,
write(" "),
readchar(_).
lod(2):-
retractall(_),
existfile("lesha.dat"),
consult("lesha.dat"),
write(" "),
beep,
!.
lod(2):-
write(" lesha.dat "),nl,
write(" "),
readchar(_).
lod(3).
repeat.
repeat:- repeat.
/* */
select(N):-
nl,
write("1 - Ho "),nl,
write("2 - "),nl,
write("3 - "),nl,
write("4 - "),nl,
write("5 - "),nl,
write("==>"),
readint(X),
sel(X,N).
sel(1,N):-
nl,
write(" 蠠 :"),
readint(N),
svod(M,_,_,_,_,_,_),
M=N.
sel(1,N):-
N=0.
sel(2,N):-
nl,
write(" :"),
readint(L),
svod(Z,L,_,_,_,_,_),
N=Z.
sel(2,N):-
N=0.
sel(3,N):-
nl,
write(" : "),
readint(F),
svod(Z,_,F,_,_,_,_),
N=Z.
sel(3,N):-
N=0.
sel(4,N):-
nl,
write(" :"),
readint(Q),
svod(Z,_,_,Q,_,_,_),
N=Z.
sel(4,N):-
N=0.
sel(5,N):-
nl,
write(" :"),
readint(W),
svod(Z,_,_,_,W,_,_),
N=Z.
Domains N,i,n,y,m,d,t,v,p=integer database -svod1 svod1(n,y,m,d,t,v,p) database -lolo lolo(n,y,m,d,t,v,p) database -kuku kuku(n,y,m,d,t,v,p) database svod(n,y,m,d,t,v,p) Predicates
Copyright (c) 2024 Stud-Baza.ru , , , .