Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!haven!adm!news From: C0361@univscvm.csd.scarolina.edu ( Thomas Jenkins) Newsgroups: comp.lang.pascal Subject: Saving screen to disk Message-ID: <25005@adm.brl.mil> Date: 14 Nov 90 22:48:08 GMT Sender: news@adm.brl.mil Lines: 34 The previous example will get the screen AND has all the info neede to write to the disk. Try: PROCEDURE WriteScreen ( VAR buf ; bytesToWrite : WORD ; fileName : STRING ) ; VAR f : FILE ; numWritten : WORD ; BEGIN Assign ( f , fileName ) ; ReWrite ( f , 1 ) ; { ,1 VERY important :-) } BlockWrite ( f , buf , bytesToWrite , numWritten ) ; IF ( numWritten < bytesToWrite ) THEN BEGIN { Error handling here - probably full disk } END ; { IF } END ; { WriteScreen } ReadScreen would be just the oppisite :-). I haven't tried this code ( on the fly as it were ) but it works fine in my encryption, indexfiles, and sorting units. tom THOMAS E. JENKINS, JR. PROGRAMMER, UNIVERSITY OF SOUTH CAROLINA BITNET, C0361 AT UNIVSCVM.BITNET INTERNET C0361 AT UNIVSCVM.CSD.SCAROLINA.EDU