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
| program essaiConsole;
{$FRAME_WIDTH 640}
{$FRAME_HEIGHT 300}
{$FRAME_RATE 12}
{$BACKGROUND $FFFFFF}
uses
Flash8;
var
t: textField;
f: textFormat;
a: array of string;
i: integer;
const
l = 15;
procedure initConsole;
begin
f := textFormat.create('Georgia', 16);
f.color := $000088;
t := textField.create(_root, 't', 0, 0, 0, 640, 300);
t.setNewTextFormat(f);
end;
procedure writeLn(s: string);
var
i: integer;
begin
//
a[Length(a)] := s;
//
if Length(a) <= l then
t.text := t.text + a[Length(a)-1] + #13
else
begin
t.text := '';
for i := 0 to l - 1 do t.text := t.text + a[i + Length(a) - l] + #13;
end;
end;
begin
initConsole;
for i := 1 to 20 do
writeLn('ligne ' + intToStr(i));
end. |
Partager