I think it's a runtime error, but....
Posted on 2000-03-23
I don't know what's wrong here. I think I'm getting a runtime error in this:
var name: string;
procedure GETDATA (var localAppFile: text;
var localname: string;
var localnumb: integer;
var localwt: integer);
readln (localAppFile, localname);
readln (localAppFile, localnumb);
readln (localAppFile, localwt);
if (numb < 10) and (wt < 180) then
writeln ('Accepted ');
if not ((numb < 10) and (wt < 180)) then
writeln ('Rejected ');
writeln ('Your weight is more than the given weight ');
writeln ('The number of cigarettes you smoke is over the limit ');
assign (AppFile, 'A:\AppFile2.dat');
while not seekeof (AppFile) do
GETDATA (AppFile, name, numb, wt);
This is what I get on the "Accepted" ones:
"Your weight is more than the given weight"
" The number of cigarettes you smoke is over the limit"