|
|
вернуться в форумCan I read input text "while not Eoln do"? PLEASE HELP!!! Please! I wrote Spell Checker ... While not Eoln do Begin ... {I Check It} End; Why doesn't it work? Who knows? Edited by author 07.08.2005 18:47 Re: Can I read input text "while not Eoln do"? PLEASE HELP!!! Hi! Try using "While (not eof(input)) do". It doesn't work! Hello! Thank you, but it doesn't work! Re: It doesn't work! Hi! My program looks something like this (and it works, I just send it again to be sure): Var ch: char; p: boolean; e,c: Longint; Begin p:= true; e:= 0; c:= 0; While (not eof(input)) do begin read(input,ch); if (valid_expression) then do_something; if (valid_expression) then do_something; if (valid_expression) then do_something; if (valid_expression) then do_something else do_something_else; if (valid_expression) then do_something; end; writeln(output,e); End. Just change "valid_expression", "do_something" and "do_something_else" for the apropiate code. Edited by author 09.08.2005 22:32 Re: It doesn't work! Try SeekEof(stdin) Re: Can I read input text "while not Eoln do"? PLEASE HELP!!! Послано Igor 10 авг 2005 02:56 while not EOF do begin read(n); .... .... .... end; Please! I wrote Spell Checker ... While not Eoln do Begin ... {I Check It} End; Why doesn't it work? Who knows? Edited by author 07.08.2005 18:47 Re: Can I read input text "while not Eoln do"? PLEASE HELP!!! Послано Igor 10 авг 2005 02:56 while not EOF do begin read(n); .... .... .... end; Thanks Thank you. I'll try it |
|
|