uses dos, crt; type NumType = array['0'..'9'] of byte; const EraseChar = '°'; EraseCol = 8; DrawChar = 'Û'; DrawCol = 15; Nums: NumType = (119,36,93,109,46,107,123,37,127,111); Procedure DrawLine(x, y, num: byte; Thing: char); var i: byte; begin if Thing = EraseChar then TextColor(EraseCol) else Textcolor(DrawCol); Case num of 0: begin GotoXY(x, y); for num := 1 to 7 do write(Thing); end; 1: begin for num := 0 to 5 do begin GotoXY(x, y + num); Write(Thing); end; end; 2: begin for num := 0 to 5 do begin GotoXY(x + 6, y + num); Write(Thing); end; end; 3: begin GotoXY(x, y + 5); for num := 1 to 7 do write(Thing); end; 4: begin for num := 0 to 5 do begin GotoXY(x, y + num + 5); Write(Thing); end; end; 5: begin for num := 0 to 5 do begin GotoXY(x + 6, y + num + 5); Write(Thing); end; end; 6: begin GotoXY(x, y + 10); for num := 1 to 7 do write(Thing); end; end;{case} end; Procedure DrawNum(x, y, num: byte); var i, j, temp, test: Byte; Thing: Char; begin if num = 0 then begin {draw colon} GotoXY(x, y + 2); write(' ÛÛ'); GotoXY(x, y + 8); Write(' ÛÛ'); end else begin Thing := EraseChar; test := 0; for j := 1 to 2 do begin temp := num; for i := 0 to 7 do begin if (temp and 1) = test then DrawLine(x, y, i, Thing); temp := temp shr 1; end;{for i} Thing := DrawChar; test := 1; end;{for j} end;{if} end; Procedure DrawTime(x, y: byte); var Hour, Minute, Second, Hundred: word; other: word; temp: string[2]; begin GetTime(Hour, Minute, Second, Hundred); {} {8} {16 col} Str(Hour, Temp); if Temp[0] = #1 then begin Temp[2] := Temp[1]; Temp[1] := '0'; end; DrawNum(x, y, Nums[Temp[1]]); {hour} DrawNum(x + 8, y, Nums[Temp[2]]); DrawNum(x + 16, y, 0); {colon} Str(Minute, Temp); if Temp[0] = #1 then begin Temp[2] := Temp[1]; Temp[1] := '0'; end; DrawNum(x + 21, y, Nums[Temp[1]]); {minute} DrawNum(x + 29, y, Nums[Temp[2]]); DrawNum(x + 37, y, 0); {colon} Str(Second, Temp); if Temp[0] = #1 then begin Temp[2] := Temp[1]; Temp[1] := '0'; end; DrawNum(x + 42, y, Nums[Temp[1]]); {second} DrawNum(x + 50, y, Nums[Temp[2]]); Repeat GetTime(Hour, Minute, Other, Hundred); Until (Second <> Other) or KeyPressed; end; begin ClrScr; Repeat DrawTime(1, 1); until KeyPressed end.