tr: = $ 1f; with man do doif (mode = 1) or (mode = 3) thenEnter (x +3 + Length (MENU2_S [1]), y +1,15, Record_Number, flag, Str); (length (Str) = 0) and (not flag) then windows (23,9,5,36,2, 'Це поле обов'язково для введення!'); textattr: = $ 1f; (length (Str) <> 0) or flag else (x +3 + Length (MENU2_S [1]), y +1,15,'', flag, Str); _Number: = str; if (mode = 1) or (mode = 3) thenif not flag then (x +3 + Length ( MENU2_S [2]), y +2,20,'', flag, Str); (length (Str) = 0) and (not flag) then windows (23,9,5,36,2, 'Це поле обов'язково для введення! '); textattr: = $ 1f; (length (Str) <> 0) or flag else if not flag then (x +3 + Length (MENU2_S [2]), y +2,20,' ', flag, Str); _Famile: = str; if not flag then (x +3 + Length (MENU2_S [3]), y +3,20, Record_Special, flag, str); Record_Special: = str; not flag then (x +3 + Length (MENU2_S [4]), y +4,20, Record_Name, flag, str); Record_Name: = str; not flag then (x +3 + Length (MENU2_S [5]), y +5 , 15, Record_Fathername, flag, str); Record_Fathername: = str; not flag then (x +3 + Length (MENU2_S [6]), y +6,18, Record_Year, flag, str); Record_Year: = str;; : = $ 0b; if mode = 1 then
l: = windows (23,9,5,30,1, 'Продовжувати вводити записи?');
{Print old windows} for i: = 0 to height do for j: = 0 to (widgth +2) * 2-1 do (ptr (seg (p ^), ofs (p ^) + i * ( (widgth +2) * 2) + j) ^, ptr (segb800, 80 * 2 * (y + i-1) + x * 2 + j-2) ^, 1); (p); window (oldminx, oldminy, oldmaxx, oldmaxy);; windows_sort (x, y: integer; height, widgth: integer; var flag: boolean; var n: integer);
const STRin = 'Виберіть поле сортування';
var p: pointer; i, j, k: integer; c: char; oldmaxx, oldmaxy, oldminx, oldminy: integer;, cur2: byte; str: string;: = lo (windmax) +1; oldmaxy: = hi (windmax) +1; oldminx: = lo (windmin) +1;: = hi (windmin) +1; window (1,1,80,25); getmem (p, (height +1) * (widgth +2) * 2);
{Save window} for i: = 0 to height do for j: = 0 to (widgth +2) * 2-1 do (ptr (segb800, 80 * 2 * (y + i-1) + x * 2-2 + j) ^, ptr (seg (p ^), ofs (p ^) + i * ((widgth +2) * 2) + j) ^, 1);
{Print window} textattr: = $ 1b; window (x, y, x + widgth-1, y + height-1); clrscr; (1,1,80,25); gotoxy (x, y) ; write (# 201); for i: = 1 to round ((widgth-length (STRin) -2)/2) do (# 205); write (STRin); for i: = 1 to (widgth-length ( STRin) -2) div 2 do (# 205); write (# 187); for i: = 1 to height-2 do begin (x, y + i); write (# 186); gotoxy (x + widgth- 1, y + i); write (# 186); end; (x, y + height-1); write (# 200); for i: = 1 to widgth-2 do Write (# 205); (# 188 ); {Making dark area} j: = $ 08; for i: = 1 to height-1 do for k: = 0 to 1 do (j, ptr (segb800, 80 * 2 * (y-1 + i) + ( x + k) * 2 + widgth * 2-1) ^, 1); for i: = 1 to widgth do (j, ptr (segb800, 80 * 2 * (y + height-1) + (x +1) * 2 + i * 2-1) ^, 1); for i: = 1 to 12 dogotoxy (x +3, y + i); write (MENU2_S [i]); end;: = false; n: = 1 ; textattr: = $ 1f; r...