主题:請教各位
我有個composition analyzer
要cal 字數
procedure Noofwords;
var
c:string;
m,space,count:integer;
begin
count:=0;
while not eof(infile) do
begin
while not eoln(infile) do
begin
count:=0;
begin
read(infile, c);
write(c);
end;
for m:= 1 to length(c) do
if (c[m]=chr(32))and (c[m-1]<>chr(32))
then count:=count+1;
writeln('There are ',count,' words in this paragraph.');
readln;
end;
readln(infile);
writeln;
end;
reset(infile)
end;
但係要read 果篇野多過255string
變到多咗果d 去咗當第2個段落咁計
我想問下各位有咩方法解決
thank u!
要cal 字數
procedure Noofwords;
var
c:string;
m,space,count:integer;
begin
count:=0;
while not eof(infile) do
begin
while not eoln(infile) do
begin
count:=0;
begin
read(infile, c);
write(c);
end;
for m:= 1 to length(c) do
if (c[m]=chr(32))and (c[m-1]<>chr(32))
then count:=count+1;
writeln('There are ',count,' words in this paragraph.');
readln;
end;
readln(infile);
writeln;
end;
reset(infile)
end;
但係要read 果篇野多過255string
變到多咗果d 去咗當第2個段落咁計
我想問下各位有咩方法解決
thank u!