- 6


connect([],L,L).

connect([N | L1 ],L2,[N | L3]):-connect(L1 ,L2,L3).

/*------------------- --------- */

view_list(Sp):-makewindow(5,48,7,"COEPMOE ",5, 1 5, 1 5,45),

gotowindow(5),cursor(10,5),list(Sp,1),readchar(L),window(Sp,1).

list([], N).

list(T,7):-readchar(L),scroll(1 ,0),cursor( 10,5),list(T, 1 ).

list([H|T],N):-N1=N+1,N2=N1*6,write(H), sound(10,3000),

cursor(10,N2),list(T,N1),!.

/* ------- -----------*/

insert_sort( [],[]).

insert_sort([X|Tail],Sorted_list):-insert_sort(Tail,Sorted_Tail),

insert(X,Sorted_Tail,Sorted_list).

insert(X,[Y|Sorted-list],[Y|Sorted_list1]):-X>Y,!,

insert(X,Sorted_list,Sorted_list1).

insert(X,SortedJist,[X|Sorted_list]).

/* ----------- -------- */

add_list(S):-makewindow(6,48,7," ",5, 15, 15,45),

gotowindow(6), cursor(3,5),

write("B - 1 "),cursor(5,5),

write("B - 2"),cursor(7,5),

readint(L),sound(8,2000),L

goto(Sp, 1 ):-makewindow(7,48,7, "OABEHE ",5, 15, 15,45),

gotowindow(7),cursor(5,5),

write("BBETE : "),cursor(5,28),

readint(X),sound(8,3000),connect([X],Sp,Sp1),cursor(7,5),

324

write (" - ? < y/n > "),readchar(Z),sound(8, 2000),qrt(Z,Sp1).

goto(Sp,2):-makewindow(8,48, 7,"OABEHEKCCK", 5, 15,15,45),

gotowindow(8),cursor(5,5),

write("BBETE : "),cursor(5,28),

readint(X), sound(8,3000),connect(Sp,[X], Sp1),cursor(7,5),

write(" - ? < y/n > "),readchar(Z),sound(8,2000),prt(Z,Sp1).

prt('y',Sp1):-goto(Sp1,2).

prt('n',Sp1 ):-view_list(Sp1).

qrt('y',Sp1):-goto(Sp1,1).

qrt('n',Sp1 ):-view_list(Sp1).

/*------------------------------------------------------------------------------------*/

soundl :-sound(15,1000),sound(15,1500),sound(15,2000).

sound2:-sound(15,2000),sound(15,1500),sound(15,1000).

325

319 :: 320 :: 321 :: 322 :: 323 :: 324 :: 325 ::