doubt in clrscr
doubt in clrscr
(OP)
Hai friends,
Iam using Turbo Pascal 7.0.
In this simple program:
program test(input,output);
begin
clrscr;
writeln;
Writeln('Hello');
Readln;
end.
Here, in this program in line 3 (ie) clrscr;
Its giving an error saying unknown identifier.
I want to clear the screen and show the output.
Kindly advice me as regards this.
Regards
Uma.
Iam using Turbo Pascal 7.0.
In this simple program:
program test(input,output);
begin
clrscr;
writeln;
Writeln('Hello');
Readln;
end.
Here, in this program in line 3 (ie) clrscr;
Its giving an error saying unknown identifier.
I want to clear the screen and show the output.
Kindly advice me as regards this.
Regards
Uma.
RE: doubt in clrscr
try this:
program test(input,output);
uses crt; { <- add this line }
begin
clrscr;
writeln;
Writeln('Hello');
Readln;
end.
RE: doubt in clrscr
Thanx for ur reply. But I have added uses Crt in the program
(ie)
program test(input,output);
uses Crt;
begin
clrscr;
writeln;
Writeln('Hello');
Readln;
end.
But its giving a runtime error as Division by zero for this. Plz help me as Iam desperate.
RE: doubt in clrscr
But all is not lost! Because this is well known, there are already a lot of replacement crt units and patches written by friendly lovers of Pascal. Do some web-searching and you'll find one.
I've never bothered because I only use crt for keypress functions, so when i found out about that error I just wrote my own call-to-dos for keypresses, and haven't used crt since.
Hope this helps,
Lionel
(Oh, and compliments to Borland, it's a very rare thing to find a bug in their compilers)