Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 245
  • Last Modified:

suspend a output

Is it possible to suspend a output to screen just using
following:

var ch : char;

begin
write('press any key to continue...');
read(ch);
end.

if not, what is the correct way? thx
0
ping072497
Asked:
ping072497
  • 2
1 Solution
 
PFranzCommented:
I usually use

var ch:char;

Begin
 write('press any key');
 ch := readkey;
end.
0
 
ping072497Author Commented:
I tried the above program. It seems doesn't work to me.
I couldn't compile it. I'm using Tubo Pascal 7.0. Is readkey
a function?


0
 
PFranzCommented:
It is a function from the CRT Unit.
You can use this function also to read a key like ESC (ch=CHR(27)) or one of the F-keys.
 
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now