Xref: utzoo comp.lang.pascal:5455 comp.sys.ibm.pc.misc:6555 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!bionet!ames!ucsd!cogsci!miller From: miller@cogsci.ucsd.EDU (Jeff Miller) Newsgroups: comp.lang.pascal,comp.sys.ibm.pc.misc Subject: Turbo Pascal/DOS Batch Heap Peculiarity Keywords: pascal, batch, heap Message-ID: <296@cogsci.ucsd.EDU> Date: 16 Feb 91 06:23:30 GMT Organization: University of California, San Diego Lines: 35 Here's a peculiarity that's new to us, and we hope someone can help us understand it. The symptoms are easy to observe: 1. Compile the following program with Turbo pascal 5.0 or 6.0: Program Test; Begin Writeln(LongInt(HeapOrg)); End. 2. Now make up two batch files, Test1.bat and Test2.bat Each has a single line: Test The difference between the batch files is that one ends with a carriage return (so there is really a null line at the end of the file), whereas the other batch file ends after the second "t" in Test. 3. Run the batch files, and they report different HeapOrg's!!!!!! Anyone know why this is? (Choose one from column A and one from column B) A B DOS Bug Turbo Feature Any suggestions on how to handle this problem? The peculiarity becomes a problem when we run, inside batch files, programs that use the heap-- if we forget that final carriage return, there goes the FAT table. Thanks for any insights you can offer. Jeff Miller jomiller@ucsd.edu