. , , ,

,,,

- " " Prolog — ,

N -14

P

" "

. -1-95.

1. :

- .

2. :

- , -

BT, :

╔═══════════════════════════════════════════════════════════╗

║ TE ߠ ║

╠═════╦═════╦══════╦═════╦════╦══════╦══════════╦═════╦═════╣

║ ║ ║ N ║ No ║ ║.║ ║ ║║

║║-║ - ║║║ ╠═════╦════╬═╦═╦═╣║

║. ║ ║║ ║ ║ ║║ No ║║║║ ║

╠═════╬═════╬══════╬═════╬════╬══════╬═════╬════╬═╬═╬═╬═════╣

:c, ,

-, ,

.

.

3. , :

3.1 , -

, , -

:

- ,

- - ,

- ,

- ,

- ,

- .

3.2 :

- ,

- - ,

- ,

- ,

- ,

- .

4. :

4.1

4.2 .

5. - :

1.

4.10.96

2. , ,

18.10.96

3.

25.10.96

4. -

15.11.96

5.

29.11.96

6. -

24.12.96

7.

25.12.96

/ ../

/ .., -1-95/

a

@.

....................................

1.

...................

2. ...

3. ...............

4. ...........

5. :

5.1 Start .............

5.2 Patch ...........

5.3

Process(0) ...........................

5.4 Process(1) .

5.5 Process(2) ..........

5.6 Process(3) .....

5.7 Process(4) .....

5.8 Process(5) ...

5.9 Process(6) ........

5.10 Process(7) ......

5.11 - Process(8) ....

5.12 Process(9) .....

5.13 Select(_) ..

5.14 Lod ............

5.15 Sve .........

6. .......................

7. .......................

8.

: ...................

.................................

..........................

@

@

Turbo Prolog

v 2.0 ( ). -

-

, -

- . -

.

, - , -

- ..

-

- .

@ 1. -

@ @

- - -,

.  

- -

-

. -

.

,

: - -

.

-

: , -

-

,

.

--

-

. -

,

.

@2.

-

,

, -

. :

, .

, .

, -

- , - ,

- .  

, -

, - , -

- , - . -

-

.

@3.

,

patch. -

, -

.

:

0 - ... -

1 - -

2 - -

3 - -

4 - -

5 - -

6 - -

7 - -

8 - - - -

9 - -

@5.

, -

.

@ 5.1 Start.

Start GOAL -

.

, -

Patch.

@ 5.2 Patch.

-

, -

C. -

Process, C -

. Repeat,

Process , C 9

.

@5.3 Process(0).

, -

.

@5.4 Process(1).

Process(1) -

, , . -

, -

.

-

. -

X,

Select, X. -

Select , , c -

. Process(1) Repeat,

.

@5.5 Process(2).

. -

, , -

- . -

Select, . Select

retract

. ( -

, ) -

( Error).

@5.6 Process(3).

Process(3) c . -

.

@5.7 Process(4).

, :

" ", " -

dima.dat", " ".

Lod, -

C,

.  

Process(4) Repeat.

@5.8 Process(5).

Working(5) process(4).

Save, , -

I.

@5.9 Process(6).

. -

: , -

, ,

"not.dat". Procedure,

, .

@ 5.10 Process(7).

@

.

,-

.

@

@ 5.11 - Process(8).

c

. :

-

, -

,

, .

@5.12 Process(9).

@

@ . -

9.

@ 5.13 Select(_).

. ,

. Sel(M,N). C -

(, ) -

. N -

Select.

@5.14 Lod.

-

, :

lod(1) 򠠠 Ġ 砠 ,

,lod(2) - dima.dat.  

existfile

consult. -

, (-

Io_error).

@5.15 @ Sve.

-

, :

Sve(1) Ġ , ,

Sve(2) - dima.dat. Ġ -

save. -

( Error).

@6. .

/* **************************

* ߠ *

* *

* *

* *

**************************

*/

domains

b,c,d,m,r,z,i,n,n1,ko,ob,pl=integer

t,a,f,s,l,p,u,na,j=symbol

database -svod1

svod1(a,b,c,d,f,m,t,r,s,l,p,u)

database -lolo

lolo(a,b,c,d,f,m,t,r,s,l,p,u)

database -kuku

kuku(a,b,c,d,f,m,t,r,s,l,p,u)

database

svod(a,b,c,d,f,m,t,r,s,l,p,u)

predicates

start

patch

load

select(i)

sel(i,i)

process(i)

procedure(i)

sve(i)

lod(i)

repeat

goal

start.

clauses

/* ,. */

start:-

makewindow(1,10,0," ",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("dima.dat"),

consult("dima.dat"),

cursor(1,2),

write(" ").

load:-

cursor(1,2),

write(" ").

/*pp ,. */

process(7):-

makewindow(1,2,7," ",0,0,25,80),

nl,

write(" :"),readln(K),nl,

write(" ࠠ :"),readint(O),nl,

write(" :"),readint(I),nl,

write(" 蠠 :"),readint(Y),nl,

write(" 򠠠 :"),readln(T),nl,

write(" ꠠ :"),readint(FF),nl,

write(" ࠠ :"),readln(OO),nl,

write(" ࠠ :"),readint(YY),nl,

write(" :"),readln(KK),nl,

write(" 蠠 :"),readln(II),nl,

write(" oࠠ :"),readln(TT),nl,

write(" ࠠ :"),readln(HH),nl,

N1=K,NA1=O,KO1=I,OB1=Y,PL1=T,FF1=FF,OO1=OO,

YY1=YY,KK1=KK,II1=II,TT1=TT,HH1=HH,

assertz(svod(N1,NA1,KO1,OB1,PL1,FF1,OO1,YY1,KK1,II1,TT1,HH1)),

removewindow,

fail.

/* -,. */

process(8):-

makewindow(1,2,7,"-",0,0,25,80),

nl,

write(" :"),readln(A),nl,nl,

svod(KY,NA,KO,OB,PL,N,OOO,YYY,KKK,III,TTT,HHH),

A=KY,

write(" :"),write(A),nl,

write(" ࠠ :"),write(NA),nl,

write(" :"),write(KO),nl,

write(" 蠠 :"),write(OB),nl,

write(" :"),write(PL),nl,

write(" ꠠ :"),write(N),nl,

write("C ࠠ :"),write(OOO),nl,

write(" ࠠ :"),write(YYY),nl,

write(" :"),write(KKK),nl,

write(" 蠠 :"),write(III),nl,

write(" ࠠ :"),write(TTT),nl,

write(" ࠠ :"),write(HHH),nl, nl,nl,

write(" "),

readchar(_),

removewindow,

!.

process(8):-

write(" ."),

write(" "),

write(" "),nl,nl,nl,

write(" :"),

readln(A),nl,

A=N1,

write(" ࠠ :"),readint(F),nl,

write(" :"),readint(Y),nl,

write(" 蠠 :"),readint(J),nl,

write(" 򠠠 :"),readln(G),nl,

write(" ꠠ :"),readint(FFFF),nl,

write(" ࠠ :"),readln(OOOO),nl,

write(" ࠠ :"),readint(IIII),nl,

write(" :"),readln(KKKK),nl,

write(" 蠠 :"),readln(TTTT),nl,

write(" ࠠ :"),readln(MMMM),nl,

write(" ࠠ :"),readln(GGGG),nl,

NA1=F,KO1=Y,OB1=J,PL1=G,FF1=FFFF,OO1=OOOO,

YY1=IIII,KK1=KKKK,II1=TTTT,TT1=MMMM,HH1=GGGG,

assertz(svod(N1,NA1,KO1,OB1,PL1,FF1,OO1,YY1,KK1,II1,TT1,HH1)),

removewindow,

fail.

/*pp pp,. */

process(0):-

makewindow(1,2,7," pp...",0,0,25,80),

write(" p-p "),nl,nl,

write(" - ."),

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),

RR=N,

svod(KY,NA,KO,OB,PL,RR,OOO,YYY,KKK,III,TTT,HHH),

write(" :"),write(KY),nl,

write(" ࠠ :"),write(NA),nl,

write(" :"),write(KO),nl,

write(" 蠠 :"),write(OB),nl,

write(" :"),write(PL),nl,

write(" ꠠ :"),write(RR),nl,

write(" ࠠ :"),write(OOO),nl,

write(" ࠠ :"),write(YYY),nl,

write(" :"),write(KKK),nl,

write(" 蠠 :"),write(III),nl,

write(" oࠠ :"),write(TTT),nl,

write(" ࠠ :"),write(HHH),nl,

nl,

write(" :"),readln(N1),nl,

write(" ࠠ :"),readint(NA1),nl,

write(" :"),readint(KO1),nl,

write(" 蠠 :"),readint(OB1),nl,

write(" 򠠠 :"),readln(PL1),nl,

write(" ꠠ :"),readint(RR1),nl,

write(" ࠠ :"),readln(OO1),nl,

write(" ࠠ :"),readint(YY1),nl,

write(" :"),readln(KK1),nl,

write(" 蠠 :"),readln(II1),nl,

write(" ࠠ :"),readln(TT1),nl,

write(" ࠠ :"),readln(HH1),nl,

retract(svod(KY,NA,KO,OB,PL,RR,OOO,YYY,KKK,III,TTT,HHH)),

assert(svod(N1,NA1,KO1,OB1,PL1,RR1,OO1,YY1,KK1,II1,TT1,HH1)),

!,

removewindow.

/* ,. */

process(2):-

makewindow(1,2,7," ",0,0,25,80),

nl,

select(N),

X=N,

svod(KY,NA,KO,OB,PL,X,OOO,YYY,KKK,III,TTT,HHH),

retract(svod(KY,NA,KO,OB,PL,X,OOO,YYY,KKK,III,TTT,HHH)),!,

removewindow.

/* ,. */

process(3):-

makewindow(1,2,7,"p ",0,0,25,80),

nl,

write("╔═════════════════════════════════════════════════════════╗"),

write("║ ߠ ║"),

write("╠═════╦═════╦══════╦═════╦════╦══════╦════════╦═════╦═════╣"),

write("║║ ║ No ║ No ║ ║-║ ║ ║ ║"),

write("║. ║-║-║║║ ║═════╦══╬═╦═╦═╣║"),

write("║ ║ ║ ║ ║ ║ ║║No║║║║ ║"),

write("╠═════╬═════╬══════╬═════╬════╬══════╬═════╬══╬═╬═╬═╬═════╣"),

svod(KY,NA,KO,OB,PL,N,OOO,YYY,KKK,III,TTT,HHH),

cursor(Z,_),

cursor(Z,0),write(KY),

cursor(Z,8),write(NA),

cursor(Z,16),write(KO),

cursor(Z,26),write(OB),

cursor(Z,32),write(PL),

cursor(Z,39),write(N),

cursor(Z,46),write(OOO),

cursor(Z,52),write(YYY),

cursor(Z,58),write(KKK),

cursor(Z,66),write(III),

cursor(Z,68),write(TTT),

cursor(Z,70),write(HHH),

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 - dima.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 - dima.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(" e , "),

nl,

write(" :"),

readln(X),

svod(KY,NA,KO,OB,PL,N,OOO,YYY,KKK,III,TTT,HHH),

S=KY,

S=X,

NA1=NA,KO1=KO,OB1=OB,PL1=PL,FF1=N,OO1=OOO,YY1=YYY,

KK1=KKK,II1=III,TT1=TTT,HH1=HHH,

assert(svod1(S,NA1,KO1,OB1,PL1,FF1,OO1,YY1,KK1,II1,TT1,HH1)),

fail.

procedure(1):-

write(" "),nl,

write("╔═════════════════════════════════════════════════════════╗"),

write("║ TEX ߠ ║"),

write("╠═════╦═════╦══════╦═════╦════╦══════╦══════════════╦═════╣"),

write("║║ ║ No ║ No ║ ║-║ ! ║ ║"),

write("║. ║-║-║║║ ╠═════╦══╦═╦═╦═╣║"),

write("║ ║ ║ ║ ║ ║ ║║No║║║║ ║"),

write("╠═════╬═════╬══════╬═════╬════╬══════╬═════╬══╬═╬═╬═╬═════╣"),

svod1(S,NA,KO,OB,PL,N,OOO,YYY,KKK,III,TTT,HHH),

cursor(Z,_),

cursor(Z,0),write(S),

cursor(Z,8),write(NA),

cursor(Z,16),write(KO),

cursor(Z,26),write(OB),

cursor(Z,32),write(PL),

cursor(Z,39),write(N),

cursor(Z,46),write(OOO),

cursor(Z,52),write(YYY),

cursor(Z,58),write(KKK),

cursor(Z,66),write(III),

cursor(Z,68),write(TTT),

cursor(Z,70),write(HHH),

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,

write(" :"),

readint(X),

svod(KY,NA,KO,OB,PL,N,OOO,YYY,KKK,III,TTT,HHH),

S=NA,

S=X,

N1=KY,KO1=KO,OB1=OB,PL1=PL,FF1=N,OO1=OOO,YY1=YYY,

KK1=KKK,II1=III,TT1=TTT,HH1=HHH,

assert(lolo(N1,S,KO,OB1,PL1,FF1,OO1,YY1,KK1,II1,TT1,HH1)),

fail.

procedure(2):-

write(" "),nl,

write("╔═════════════════════════════════════════════════════════╗"),

write("║ ߠ ║"),

write("╠═════╦═════╦══════╦═════╦════╦══════╦════════╦═════╦═════╣"),

write("║║ ║ No ║ No ║ ║-║ ║ ║║"),

write("║.║-║-║║║ ╠═════╦══╬═╦═╦═╣ ║"),

write("║ ║ ║ ║ ║ ║ ║║No║║║║ ║"),

write("╠═════╬═════╬══════╬═════╬════╬══════║═════╬══╬═╬═╬═╬═════╣"),

lolo(KY,S,KO,OB,PL,N,OOO,YYY,KKK,III,TTT,HHH),

cursor(Z,_),

cursor(Z,0),write(KY),

cursor(Z,8),write(S),

cursor(Z,16),write(KO),

cursor(Z,26),write(OB),

cursor(Z,32),write(PL),

cursor(Z,39),write(N),

cursor(Z,46),write(OOO),

cursor(Z,52),write(YYY),

cursor(Z,58),write(KKK),

cursor(Z,66),write(III),

cursor(Z,68),write(TTT),

cursor(Z,70),write(HHH),

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(" :"),

readln(X),

svod(KY,NA,KO,OB,PL,N,OOO,YYY,KKK,III,TTT,HHH),

S=PL,

S=X,

N1=KY,NA1=NA,KO1=KO,OB1=OB,OO1=OOO,YY1=YYY,

KK1=KKK,II1=III,TT1=TTT,HH1=HHH,FF1=N,

assert(kuku(N1,NA1,KO1,OB1,S,FF1,OO1,YY1,KK1,II1,TT1,HH1)),

fail.

procedure(3):-

write(" "),nl,

write("╔═══════════════════════════════════════════════════════════╗"),

write("║ ߠ ║"),

write("╠═════╦═════╦══════╦═════╦══════╦══════╦════════╦═════╦═════╣"),

write("║║ ║ No ║ No ║ ║-║ ║ ║║"),

write("║. ║-║-║║ ║ ╠═════╦══╬═╦═╦═╣ ║"),

write("║ ║ ║ ║ ║ ║ ║║No║║║║ ║"),

write("╠═════╬═════╬══════╬═════╬══════╬══════╬═════╬══╬═╬═╬═╬═════╣"),

kuku(KY,NA,KO,OB,S,N,OOO,YYY,KKK,III,TTT,HHH),

cursor(Z,_),

cursor(Z,0),write(KY),

cursor(Z,8),write(NA),

cursor(Z,16),write(KO),

cursor(Z,26),write(OB),

cursor(Z,32),write(S),

cursor(Z,39),write(N),

cursor(Z,46),write(OOO),

cursor(Z,52),write(YYY),

cursor(Z,58),write(KKK),

cursor(Z,66),write(III),

cursor(Z,68),write(TTT),

cursor(Z,70),write(HHH),

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("dima.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("dima.dat"),

consult("dima.dat"),

write(" "),

beep,

!.

lod(2):-

write(" dima.dat "),nl,

write(" "),

readchar(_).

lod(3).

repeat.

repeat:- repeat.

/* ,. */

select(N):-

nl,

write("1 - "),nl,

write("2 - "),nl,

write("3 - "),nl,

write("4 - "),nl,

write("5 - "),nl,

write("==>"),

readint(X),

sel(X,N).

sel(1,N):-

nl,

write(" :"),

readln(KY),

svod(KY,_,_,_,_,Z,_,_,_,_,_,_),

N=Z.

sel(1,N):-

N=0.

sel(2,N):-

nl,

write(" ࠠ :"),

readint(L),

svod(_,L,_,_,_,Z,_,_,_,_,_,_),

N=Z.

sel(2,N):-

N=0.

sel(3,N):-

nl,

write(" 򠠠 : "),

readln(F),

svod(_,_,_,_,F,Z,_,_,_,_,_,_),

N=Z.

sel(3,N):-

N=0.

sel(4,N):-

nl,

write(" :"),

readln(Q),

svod(_,_,_,_,_,Z,_,_,_,_,_,Q),

N=Z.

sel(4,N):-

N=0.

sel(5,N):-

nl,

write(" :"),

readint(PPPP),

svod(_,_,PPPP,_,_,Z,_,_,_,_,_,_),

N=Z.

sel(5,N):-

N=0.

@7.

.

-

.

...

,

, -

-

.

.

@8.

" " -

- .  

.  

, , -

, , ,

, , .

:

0 - ...

1 -

2 -

3 -

4 -

5 -

6 -

7 -

8 - -

9 -

- -

.

.

@8.1 ...

.

.

@8.2 .

:

1 -

2 -

3 -

4 -

,

1, - 2 ...

...

( ) -

.

,

. , -

.

@8.3 .

.

" " " -

" ,

.

, -

.

@8.4 .

-

. -

,

( dima.dat) -

- . , -

.

.

@8.5 .

-

. :

1 -

2 - dima.dat

3 -

2 -

dima.dat ,

.

.

1 , -

. -

,

.

3 .

@8.6 .

.

:

1 -

2 - dima.dat

3 -

-

" ".

@8.7 .

-

. :

1 -

2 -

3 -

4 -

1,2,3

, ,

"not.dat".

4 .

@8.8 .

, -

, -

.

@8.9 -.

-

.

:

,

, -

.

@8.10 .

@ .

@8.9 .

. -

. ,

, , .

.

@

--

. ,

-

.

@

. "

"

. " - "

. " -

. 2.3"


CODE=12050

/* **************************

* ߠ *

* *

* *

* *

**************************

*/

domains

b,c,d,m,r,z,i,n,n1,ko,ob,pl=integer

t,a,f,s,l,p,u,na,j=symbol

database -svod1

svod1(a,b,c,d,f,m,t,r,s,l,p,u)

database -lolo

lolo(a,b,c,d,f,m,t,r,s,l,p,u)

database -kuku

kuku(a,b,c,d,f,m,t,r,s,l,p,u)

database

svod(a,b,c,d,f,m,t,r,s,l,p,u)

predicates

start

patch

load

select(i)

sel(i,i)

process(i)

procedure(i)

sve(i)

lod(i)

repeat

goal

start.

clauses

/* */

start:-

makewindow(1,10,0," ",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("dima.dat"),

consult("dima.dat"),

cursor(1,2),

write(" ").

load:-

cursor(1,2),

write(" ").

/*pp */

process(7):-

makewindow(1,2,7," ",0,0,25,80),

nl,

write(" :"),readln(K),nl,

write(" ࠠ :"),readint(O),nl,

write(" :"),readint(I),nl,

write(" 蠠 :"),readint(Y),nl,

write(" 򠠠 :"),readln(T),nl,

write(" ꠠ :"),readint(FF),nl,

write(" ࠠ :"),readln(OO),nl,

write(" ࠠ :"),readint(YY),nl,

write(" :"),readln(KK),nl,

write(" 蠠 :"),readln(II),nl,

write(" oࠠ :"),readln(TT),nl,

write(" ࠠ :"),readln(HH),nl,

N1=K,NA1=O,KO1=I,OB1=Y,PL1=T,FF1=FF,OO1=OO,

YY1=YY,KK1=KK,II1=II,TT1=TT,HH1=HH,

assertz(svod(N1,NA1,KO1,OB1,PL1,FF1,OO1,YY1,KK1,II1,TT1,HH1)),

removewindow,

fail.

/* -*/

process(8):-

makewindow(1,2,7,"-",0,0,25,80),

nl,

write(" :"),readln(A),nl,nl,

svod(KY,NA,KO,OB,PL,N,OOO,YYY,KKK,III,TTT,HHH),

A=KY,

write(" :"),write(A),nl,

write(" ࠠ :"),write(NA),nl,

write(" :"),write(KO),nl,

write(" 蠠 :"),write(OB),nl,

write(" :"),write(PL),nl,

write(" ꠠ :"),write(N),nl,

write("C ࠠ :"),write(OOO),nl,

write(" ࠠ :"),write(YYY),nl,

write(" :"),write(KKK),nl,

write(" 蠠 :"),write(III),nl,

write(" ࠠ :"),write(TTT),nl,

write(" ࠠ :"),write(HHH),nl, nl,nl,

write(" "),

readchar(_),

removewindow,

!.

process(8):-

write(" ."),

write(" "),

write(" "),nl,nl,nl,

write(" :"),

readln(A),nl,

A=N1,

write(" ࠠ :"),readint(F),nl,

write(" :"),readint(Y),nl,

write(" 蠠 :"),readint(J),nl,

write(" 򠠠 :"),readln(G),nl,

write(" ꠠ :"),readint(FFFF),nl,

write(" ࠠ :"),readln(OOOO),nl,

write(" ࠠ :"),readint(IIII),nl,

write(" :"),readln(KKKK),nl,

write(" 蠠 :"),readln(TTTT),nl,

write(" ࠠ :"),readln(MMMM),nl,

write(" ࠠ :"),readln(GGGG),nl,

NA1=F,KO1=Y,OB1=J,PL1=G,FF1=FFFF,OO1=OOOO,

YY1=IIII,KK1=KKKK,II1=TTTT,TT1=MMMM,HH1=GGGG,

assertz(svod(N1,NA1,KO1,OB1,PL1,FF1,OO1,YY1,KK1,II1,TT1,HH1)),

removewindow,

fail.

/*pp pp*/

process(0):-

makewindow(1,2,7," pp...",0,0,25,80),

write(" p-p "),nl,nl,

write(" - ."),

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),

RR=N,

svod(KY,NA,KO,OB,PL,RR,OOO,YYY,KKK,III,TTT,HHH),

write(" :"),write(KY),nl,

write(" ࠠ :"),write(NA),nl,

write(" :"),write(KO),nl,

write(" 蠠 :"),write(OB),nl,

write(" :"),write(PL),nl,

write(" ꠠ :"),write(RR),nl,

write(" ࠠ :"),write(OOO),nl,

write(" ࠠ :"),write(YYY),nl,

write(" :"),write(KKK),nl,

write(" 蠠 :"),write(III),nl,

write(" oࠠ :"),write(TTT),nl,

write(" ࠠ :"),write(HHH),nl,

nl,

write(" :"),readln(N1),nl,

write(" ࠠ :"),readint(NA1),nl,

write(" :"),readint(KO1),nl,

write(" 蠠 :"),readint(OB1),nl,

write(" 򠠠 :"),readln(PL1),nl,

write(" ꠠ :"),readint(RR1),nl,

write(" ࠠ :"),readln(OO1),nl,

write(" ࠠ :"),readint(YY1),nl,

write(" :"),readln(KK1),nl,

write(" 蠠 :"),readln(II1),nl,

write(" ࠠ :"),readln(TT1),nl,

write(" ࠠ :"),readln(HH1),nl,

retract(svod(KY,NA,KO,OB,PL,RR,OOO,YYY,KKK,III,TTT,HHH)),

assert(svod(N1,NA1,KO1,OB1,PL1,RR1,OO1,YY1,KK1,II1,TT1,HH1)),

!,

removewindow.

/* */

process(2):-

makewindow(1,2,7," ",0,0,25,80),

nl,

select(N),

X=N,

svod(KY,NA,KO,OB,PL,X,OOO,YYY,KKK,III,TTT,HHH),

retract(svod(KY,NA,KO,OB,PL,X,OOO,YYY,KKK,III,TTT,HHH)),!,

removewindow.

/* */

process(3):-

makewindow(1,2,7,"p ",0,0,25,80),

nl,

write("╔═════════════════════════════════════════════════════════╗"),

write("║ ߠ ║"),

write("╠═════╦═════╦══════╦═════╦════╦══════╦════════╦═════╦═════╣"),

write("║║ ║ No ║ No ║ ║-║ ║ ║ ║"),

write("║. ║-║-║║║ ║═════╦══╬═╦═╦═╣║"),

write("║ ║ ║ ║ ║ ║ ║║No║║║║ ║"),

write("╠═════╬═════╬══════╬═════╬════╬══════╬═════╬══╬═╬═╬═╬═════╣"),

svod(KY,NA,KO,OB,PL,N,OOO,YYY,KKK,III,TTT,HHH),

cursor(Z,_),

cursor(Z,0),write(KY),

cursor(Z,8),write(NA),

cursor(Z,16),write(KO),

cursor(Z,26),write(OB),

cursor(Z,32),write(PL),

cursor(Z,39),write(N),

cursor(Z,46),write(OOO),

cursor(Z,52),write(YYY),

cursor(Z,58),write(KKK),

cursor(Z,66),write(III),

cursor(Z,68),write(TTT),

cursor(Z,70),write(HHH),

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 - dima.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 - dima.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(" e , "),

nl,

write(" :"),

readln(X),

svod(KY,NA,KO,OB,PL,N,OOO,YYY,KKK,III,TTT,HHH),

S=KY,

S=X,

NA1=NA,KO1=KO,OB1=OB,PL1=PL,FF1=N,OO1=OOO,YY1=YYY,

KK1=KKK,II1=III,TT1=TTT,HH1=HHH,

assert(svod1(S,NA1,KO1,OB1,PL1,FF1,OO1,YY1,KK1,II1,TT1,HH1)),

fail.

procedure(1):-

write(" "),nl,

write("╔═════════════════════════════════════════════════════════╗"),

write("║ TEX ߠ ║"),

write("╠═════╦═════╦══════╦═════╦════╦══════╦══════════════╦═════╣"),

write("║║ ║ No ║ No ║ ║-║ ! ║ ║"),

write("║. ║-║-║║║ ╠═════╦══╦═╦═╦═╣║"),

write("║ ║ ║ ║ ║ ║ ║║No║║║║ ║"),

write("╠═════╬═════╬══════╬═════╬════╬══════╬═════╬══╬═╬═╬═╬═════╣"),

svod1(S,NA,KO,OB,PL,N,OOO,YYY,KKK,III,TTT,HHH),

cursor(Z,_),

cursor(Z,0),write(S),

cursor(Z,8),write(NA),

cursor(Z,16),write(KO),

cursor(Z,26),write(OB),

cursor(Z,32),write(PL),

cursor(Z,39),write(N),

cursor(Z,46),write(OOO),

cursor(Z,52),write(YYY),

cursor(Z,58),write(KKK),

cursor(Z,66),write(III),

cursor(Z,68),write(TTT),

cursor(Z,70),write(HHH),

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,

write(" :"),

readint(X),

svod(KY,NA,KO,OB,PL,N,OOO,YYY,KKK,III,TTT,HHH),

S=NA,

S=X,

N1=KY,KO1=KO,OB1=OB,PL1=PL,FF1=N,OO1=OOO,YY1=YYY,

KK1=KKK,II1=III,TT1=TTT,HH1=HHH,

assert(lolo(N1,S,KO,OB1,PL1,FF1,OO1,YY1,KK1,II1,TT1,HH1)),

fail.

procedure(2):-

write(" "),nl,

write("╔═════════════════════════════════════════════════════════╗"),

write("║ ߠ ║"),

write("╠═════╦═════╦══════╦═════╦════╦══════╦════════╦═════╦═════╣"),

write("║║ ║ No ║ No ║ ║-║ ║ ║║"),

write("║.║-║-║║║ ╠═════╦══╬═╦═╦═╣ ║"),

write("║ ║ ║ ║ ║ ║ ║║No║║║║ ║"),

write("╠═════╬═════╬══════╬═════╬════╬══════║═════╬══╬═╬═╬═╬═════╣"),

lolo(KY,S,KO,OB,PL,N,OOO,YYY,KKK,III,TTT,HHH),

cursor(Z,_),

cursor(Z,0),write(KY),

cursor(Z,8),write(S),

cursor(Z,16),write(KO),

cursor(Z,26),write(OB),

cursor(Z,32),write(PL),

cursor(Z,39),write(N),

cursor(Z,46),write(OOO),

cursor(Z,52),write(YYY),

cursor(Z,58),write(KKK),

cursor(Z,66),write(III),

cursor(Z,68),write(TTT),

cursor(Z,70),write(HHH),

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(" :"),

readln(X),

svod(KY,NA,KO,OB,PL,N,OOO,YYY,KKK,III,TTT,HHH),

S=PL,

S=X,

N1=KY,NA1=NA,KO1=KO,OB1=OB,OO1=OOO,YY1=YYY,

KK1=KKK,II1=III,TT1=TTT,HH1=HHH,FF1=N,

assert(kuku(N1,NA1,KO1,OB1,S,FF1,OO1,YY1,KK1,II1,TT1,HH1)),

fail.

procedure(3):-

write(" "),nl,

write("╔═══════════════════════════════════════════════════════════╗"),

write("║ ߠ ║"),

write("╠═════╦═════╦══════╦═════╦══════╦══════╦════════╦═════╦═════╣"),

write("║║ ║ No ║ No ║ ║-║ ║ ║║"),

write("║. ║-║-║║ ║ ╠═════╦══╬═╦═╦═╣ ║"),

write("║ ║ ║ ║ ║ ║ ║║No║║║║ ║"),

write("╠═════╬═════╬══════╬═════╬══════╬══════╬═════╬══╬═╬═╬═╬═════╣"),

kuku(KY,NA,KO,OB,S,N,OOO,YYY,KKK,III,TTT,HHH),

cursor(Z,_),

cursor(Z,0),write(KY),

cursor(Z,8),write(NA),

cursor(Z,16),write(KO),

cursor(Z,26),write(OB),

cursor(Z,32),write(S),

cursor(Z,39),write(N),

cursor(Z,46),write(OOO),

cursor(Z,52),write(YYY),

cursor(Z,58),write(KKK),

cursor(Z,66),write(III),

cursor(Z,68),write(TTT),

cursor(Z,70),write(HHH),

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("dima.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("dima.dat"),

consult("dima.dat"),

write(" "),

beep,

!.

lod(2):-

write(" dima.dat "),nl,

write(" "),

readchar(_).

lod(3).

repeat.

repeat:- repeat.

/* */

select(N):-

nl,

write("1 - "),nl,

write("2 - "),nl,

write("3 - "),nl,

write("4 - "),nl,

write("5 - "),nl,

write("==>"),

readint(X),

sel(X,N).

sel(1,N):-

nl,

write(" :"),

readln(KY),

svod(KY,_,_,_,_,Z,_,_,_,_,_,_),

N=Z.

sel(1,N):-

N=0.

sel(2,N):-

nl,

write(" ࠠ :"),

readint(L),

svod(_,L,_,_,_,Z,_,_,_,_,_,_),

N=Z.

sel(2,N):-

N=0.

sel(3,N):-

nl,

write(" 򠠠 : "),

readln(F),

svod(_,_,_,_,F,Z,_,_,_,_,_,_),

N=Z.

sel(3,N):-

N=0.

sel(4,N):-

nl,

write(" ࠠ :"),

readln(Q),

svod(_,_,_,_,_,Z,_,_,_,_,_,Q),

N=Z.

sel(4,N):-

N=0.

sel(5,N):-

nl,

write(" :"),

readint(PPPP),

svod(_,_,PPPP,_,_,Z,_,_,_,_,_,_),

N=Z.

sel(5,N):-

N=0.

N -14 P " " . -1-95. 1. :

 

 

 

! , , , .
. , :