uses crt;
var
s : string;
n,error : integer;
Begin
clrscr;
write('n='); readln(s);
val(s,n,error);
if error <> 0 then
writeln('ErrorPos = ',error);
readln;
End.
число будет храниться в n, если это число
var
N: integer;
begin
{$i-}
repeat
write('Vvedite naturalnoe chislo N = ');
readln(N);
until (IOResult = 0) and (n in [1 .. 5]);
{$i+}
writeln(n)
end.
uses crt;
var
N:integer;
begin
clrscr;
{$I-}
repeat
write('Vvedite naturalnoe chislo N = ');
readln(N);
writeln('IOReslt = ', IOResult);
until IOResult = 0;
{$I+}
end.
writeln('IOReslt = ', IOResult);