Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function IsTheMatrixCorrect(var MyFile: TextFile): Boolean;
- var
- Number: Integer;
- TrueMatrix, IsValidInput: Boolean;
- begin
- TrueMatrix := True;
- while (not Eof(MyFile)) do
- begin
- try
- read(MyFile, Number)
- except
- TrueMatrix := False
- end;
- end;
- if Eof(MyFile) then
- IsValidInput := True
- else
- Writeln('File is empty.');
- Reset(MyFile);
- IsTheMatrixCorrect := TrueMatrix;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement