[comp.lang.pascal] clearing the screen in TP4

perrone@loligo.cc.fsu.edu (Perrone Ford) (01/19/89)

Yesterday I entered a query here about calling main in  Pascal.
  I finally used a nested procedure which worked.

  Now I have one more question... How do you clear the screen in TP$?
  TP3 understands the ClrScr command but TP$ won't ...or at least mine
  wont.  Any suggestions?

mlw@pyr.gatech.EDU (Michael Williams) (01/19/89)

To clear the screen in TP4/5, you must use the turbo pascal unit "crt".
At the top of your program, add the line "uses crt;".  This unit contains
not only clrscr, but a few other useful procedures such as gotoxy(), sound(),
clreol(), delay() ...

Michael Williams

rbk@hpctdls.HP.COM (Richard Katz) (01/19/89)

/ hpctdls:comp.lang.pascal / perrone@loligo.cc.fsu.edu (Perrone Ford) /  2:50 pm  Jan 18, 1989 /

>  Now I have one more question... How do you clear the screen in TP$?
>  TP3 understands the ClrScr command but TP$ won't ...or at least mine
>  wont.  Any suggestions?

I think you got to include the crt unit with the uses command.

rich

perrone@loligo.cc.fsu.edu (Perrone Ford) (01/20/89)

 Thank you to the folx who wrote in and told me about the little line
 about "uses CRT".  Why not just have this in the library anyway?
 Is borland taking a hint from the "no_extra_baggage idea of C ?

mitch@arcturus.UUCP (Mitchell S. Gorman) (01/21/89)

In article <468@loligo.cc.fsu.edu>, perrone@loligo.cc.fsu.edu (Perrone Ford) writes:
> 
>  Now I have one more question... How do you clear the screen in TP$?
>  TP3 understands the ClrScr command but TP$ won't ...or at least mine
>  wont.  Any suggestions?


Yeah, take a week off and go to Moorea.

But, seriously, folks...

You have to include the CRT unit at the beginning of your program.  One
of the nasty side effects of separately compiled units is having to re-
member where the hell everything is!

Do it like this:

program olias;
uses CRT, sex, drugs, rock_n_roll;

blah blah blah

"Well, you know!"

Mitch @ Rockwell, Anaheim

leonard@bucket.UUCP (Leonard Erickson) (01/22/89)

In article <468@loligo.cc.fsu.edu> perrone@loligo.UUCP (Perrone Ford) writes:
<Yesterday I entered a query here about calling main in  Pascal.
<  I finally used a nested procedure which worked.
<
<  Now I have one more question... How do you clear the screen in TP$?
<  TP3 understands the ClrScr command but TP$ won't ...or at least mine
<  wont.  Any suggestions?

Stick a line like this just after the line with the program statement:

	uses crt;

This tells the compiler to use the CRT uniit.
-- 
Leonard Erickson		...!tektronix!reed!percival!bucket!leonard
CIS: [70465,203]
"I used to be a hacker. Now I'm a 'microcomputer specialist'.
You know... I'd rather be a hacker."