Паскаль: обробка текстів, Детальна інформація

Паскаль: обробка текстів
Тип документу: Реферат
Сторінок: 17
Предмет: Комп`ютерні науки
Автор: Олексій
Розмір: 33.1
Скачувань: 1104
begin read(f, c); inlex:=not (c in empsym) end;

end;

while inlex do

begin

lex:=lex+c;

if not eof(f) then

begin

if eoln(f) then inlex:=false

else begin read(f, c); inlex:=not (c in empsym) end;

end

else inlex:=false

end;

getlex:=(lex<>'');

end;

Запис накопиченого рядка слів (глобальна змінна з ім’ ям buff) у текст задамо такою процедурою:

procedure outbuff(var f : text);

begin

writeln(f, buff); buff:=''; bp:=1;

end;

Як уже зазначалося, запис слова в рядок слів задається процедурою putlex:

procedure putlex(var f : text; lex : str; nume : integer);

var llx, k : integer;

begin

if nume > 0 then

outbuff(f);

for k:=1 to nume-1 do

writeln(f);

llx:=length(lex);

if (bp>1) and (bp+llx>mx) then

outbuff(f)

The online video editor trusted by teams to make professional video in minutes