Xref: utzoo comp.sys.ibm.pc:38685 comp.lang.pascal:2725 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!usc!apple!snorkelwacker!bloom-beacon!eru!luth!sunic!tut!ra!uwasa.fi!ts From: ts@uwasa.fi (Timo Salmi LASK) Newsgroups: comp.sys.ibm.pc,comp.lang.pascal Subject: Re: Various Turbo pascal questions Keywords: Turbo pascal Message-ID: <1989Nov23.183325.4549@uwasa.fi> Date: 23 Nov 89 18:33:25 GMT References: <2185@leah.Albany.Edu> Reply-To: ts@chyde.uwasa.fi (Timo Salmi LASK) Organization: University of Vaasa, Finland Lines: 35 In article <2185@leah.Albany.Edu> ppd491@leah.Albany.Edu (Peter P. Donohue) writes: > I have a few questions pertaining to programming in Turbo Pascal 5.5 > 1) In an external data file (containing all ascii data), what is the >maximum length of a line allowed? If you use ordinary strings the maximum is only 255 characters. You can make it as long as 64K allows by adapting var line : array [maxlengt] of char; There are some good "LongString" routines in O'Brien, Turbo Pascal, the Complete Reference. > 2) Is there a way to read any text that has been written to a screen? >I am writing a program that uses windows (that I write with pascal, not >the program) and I would like to be able to reset what was on the screen >after I clear a window. Yes, you can do this using interrupts or by reading directly from the video memory. For more details see eg Ezzel, Programming the IBM User Interface, or O'Brien, Turbo Pascal Advanced Programmer's Guide. > 3) Is there a way to read the 'variables' (I'm not sure of the exact >name for them) that are set in AUTOEXEC.BAT with the SET command? An >example is with the program, Procomm, they let you set the path to the >program with the command 'SET PROCOMM=path'. Can you read what procomm >is set to with TP5.5 and how would you do it. You mean environment variables. Please refer to your Tubo Pascal manual and see the GetEnv function. ................................................................... Prof. Timo Salmi (Site 128.214.12.3) School of Business Studies, University of Vaasa, SF-65101, Finland Internet: ts@chyde.uwasa.fi Funet: vakk::salmi Bitnet: salmi@finfun