Xref: utzoo comp.sys.ibm.pc:39004 comp.lang.pascal:2758 Path: utzoo!attcan!lsuc!maccs!cs4g6ag From: cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) Newsgroups: comp.sys.ibm.pc,comp.lang.pascal Subject: Re: Various Turbo pascal questions Keywords: Turbo pascal Message-ID: <257452CA.28297@maccs.dcss.mcmaster.ca> Date: 29 Nov 89 22:06:02 GMT References: <2185@leah.Albany.Edu> Reply-To: cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) Organization: McMaster University, Hamilton, Ontario Lines: 41 Note: I use TP4, so some changes they've made may render what I say incorrect or incomplete. In article <2185@leah.Albany.Edu> ppd491@leah.Albany.Edu (Peter P. Donohue) writes: $ 1) In an external data file (containing all ascii data), what is the $maximum length of a line allowed? If you're reading it in one line at a time, I would think TP's limit of 255 characters would apply. If you're reading it yourself and storing it into some structure other than a string, you should be able to handle as much data as you care to write your program to handle. $ 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. The way I handle this is dependent on the machine having a standard video card ... I have an array of integers absolute $b000:0000 and another at $b800:0000. When the program starts, I determine which one is the screen memory in that machine, and then I use that one for direct screen reads and writes. It's worked on every card I've ever tried it on (Herc/CGA/EGA/VGA), but I'm sure there are some machines out there in the world that it wouldn't work on. $ 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. I don't know if TP has any built-in functions to handle this ... if not, you have to check out the word at PSP:$2C. This is the segment address of the environment table. Each entry in the table consists of a bunch of characters, followed by a zero byte to end the string (standard C format). The end of the table is marked by an extra zero byte. -- Stephen M. Dunn cs4g6ag@maccs.dcss.mcmaster.ca = "\nI'm only an undergraduate!!!\n"; **************************************************************************** They say the best in life is free // but if you don't pay then you don't eat