[fpc-pascal] (no subject)

Paul Davidson pdavidson at coraxnetworks.com
Wed Nov 17 18:59:50 CET 2004


OS X 10.3.6

This code makes a window area in center of screen, and prints in that 
area.  The new window is filled with characters when DELLINE is used.  
Any hints?

program TestCRT;

    uses
      CRT;

    var
       f : text;

	procedure win( s : string );
	begin
         Window( 1, 3, ScreenWidth, ScreenHeight - 2 );
		GotoXY( 1, 1 );
		DelLine;
		Window( 1, 1, ScreenWidth, ScreenHeight );
		readln;
         GotoXY( 1, ScreenHeight - 2 );
         Write( f, s );
	end;
	
begin

	// Set up basic screen
	AssignCRT( f );
	Rewrite( f );
	// Make screen BLUE
	GotoXY( 1, 1 );
	TextBackground( Blue );
	ClrScr;
	// Middle window
	Window( 1, 3, ScreenWidth, ScreenHeight - 2 );
	GotoXY( 1, 1 );
	TextBackground( Cyan );
	ClrScr;
	
	// First message
	ClrScr;
	GotoXY( 1,ScreenHeight );
	TextColor( Blue );
	Window( 1, 1, ScreenWidth, ScreenHeight );
	GotoXY( 1, ScreenHeight - 2 );
	Write( f, 'Morning' );

     // Send some lines
	Win( 'Hello' );
	Win( 'This is a test ' );
	
	
	// Wait for human
	readln;


end.


P Davidson
Corax Networks Inc.
http://CoraxNetworks.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 3028 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20041117/41becca6/attachment.bin>


More information about the fpc-pascal mailing list