-
Notifications
You must be signed in to change notification settings - Fork 8
/
LETTERS.PAS
51 lines (43 loc) · 1.16 KB
/
LETTERS.PAS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
unit letters;
interface
procedure OutTextXY ( x, y, att : byte ; str : string );
procedure RunningText( x, y, att : byte ; str : string );
implementation
uses
Crt, Win;
procedure OutTextXY( x, y, att : byte ; str : string );
var
s : string;
begin
s[0] := char(length(str));
fillchar( s[1], length(str), 'ú' );
WriteStr( x, y, s, att );
delay( 50 );
fillchar( s[1], length(str), 'ù' );
WriteStr( x, y, s, att );
delay( 50 );
fillchar( s[1], length(str), '' );
WriteStr( x, y, s, att );
delay( 50 );
fillchar( s[1], length(str), 'þ' );
WriteStr( x, y, s, att );
delay( 50 );
WriteStr( x, y, str, att );
end;
procedure RunningText( x, y, att : byte ; str : string );
var
lastX : integer;
i : integer;
xx : integer;
begin
for i := 1 to length(str) do
begin
for xx := 80 downto x + pred(i) do
begin
WriteChar( xx, y, 2, ' ', att );
WriteChar( xx, y, 1, str[i], att );
delay( 3 );
end;
end;
end;
end.