[fpc-pascal]problems with while not eoln (input)
Morten Gulbrandsen
morten.gulbrandsen at t-online.de
Fri May 3 10:27:39 CEST 2002
If I attempt to read characters into a packed array
from a terminal, this piece of code seems to be a problem.
while not eoln(input)
do begin
read(input, ch);
if not eoln(input)
then begin
ind := ind + 1;
line[ind] := ch;
end;
end;
Can I modify eoln with some compiler option ?
complete sample program is attached.
It is from a textbook written for UCSD Apple Pascal
I think apple has \n\r\f as cr windows has \n\r and linux has only
\n
as cr, but I don't know if this is relevant.
Yours Sincerely
Morten Gulbrandsen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: countchars00.pas
Type: text/x-pascal
Size: 2364 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20020503/62ea3320/attachment.pas>
More information about the fpc-pascal
mailing list