Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!gatech!lll-lcc!well!samlb From: samlb@well.UUCP Newsgroups: comp.lang.pascal Subject: Re: cls for pascal? Message-ID: <2756@well.UUCP> Date: Wed, 11-Mar-87 13:29:38 EST Article-I.D.: well.2756 Posted: Wed Mar 11 13:29:38 1987 Date-Received: Thu, 12-Mar-87 20:34:39 EST References: <825@tekfdi.TEK.COM> Reply-To: samlb@well.UUCP (Samuel B. Bassett) Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 31 In article <825@tekfdi.TEK.COM> donp@tekfdi.UUCP (Don Primrose) writes: >... tell me how to clear the screen from inside a pascal program? That very much depends on which Pascal you are using, and what kind of terminal you have. Turbo Pascal has a ClrScr command, which takes care of it if you have defined your setup right. Other Pascals rely on sending a series of ASCII bytes to the screen which will cause it to clear. For example, Soroc, Televideo, and Liberty terminals clear the screen to all blanks and Home the cursor when they get an "*" sequence. To send this from Pascal, you would code in: WriteLn(CHR(27),'*'); (Capitalization optional) in your program whenever you wanted to clear the screen -- although I'd recommend putting: Procedure CLS; Begin WriteLn(Chr(27),'*'); End (* CLS *); somewhere near the beginning of the program (so you can find and change it easily if you switch machines or terminals), and calling it when you need it. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Sam'l Bassett, Self-Employed Writer -- My words & ideas are my own! 34 Oakland Ave., San Anselmo CA 94960; DDD: (415) 454-7282; / dual\ UUCP: {...known world...}! lll-crg!well!samlb; Compuserve: 71735,1776; \hplabs/