Who can install a turbo in the dallas area?

How can one install a patch in turbo pascal 7.0 to avoid the error message Error 200:Division by zero?

  • When I write the following code in Turbo Pascal 7.0, it compiles successfully. But when I run the program, I get the message Error 200: Division by zero. Program areaandperimeter(input,output); Uses CRT; Var length:integer; width:integer; area:integer; perimeter:integer; Begin ClrScr; writeln('Enter the length'); readln(length); writeln('Enter the width); readln(width); perimeter:=2*(length+width); area:=length*width; writeln('The perimeter is',perimeter); writeln('The area is',area); readln; End. NB: CRT is a library that contains reserved words such as ClrScr which is used to clear the screen before the program can prompt the user for input The error as I found out is caused by a bug in the CRT library file. To fix the error, one needs to download and install a patch. I downloaded one but I do not know where to install it because even after installation, I still get the error message. Please help.

  • Answer:

    Hi, Yes this is a known bug (for some time now, given the age of the development environment). Yes there is a patch for the CRT unit, and if you mail me ([email protected]) I will be happy to send you either the patch file, the compiled/corrected CRT.TPU, or both, which ever you require. Mystic

mystic smeg at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

You cannot change Turbo Pascal. You put a test in your code to check for zero before you try to divide. But if there is a problem in one of the DLL library files, find the replacement (you can google it), and download and install it. Edit: If you installed the patch, and it didn't change the results, I would think that the problem has to be within your code. Can you contact Turbo Pascal (I mean the company that wrote the software), and ask them what the problem is? Good luck with that.

no1home2day

This is our mistake. Computers can not handle divided by situation. Instead of allowing such an error message you can handle such a way that some user friendly messsage will be displayed to the user. This type of errors are called as run time errors which depends very much on our prorgam and data. They are called bugs also.

James Bond

Considering you are not dividing anything in your program, looks like that there is definately something wring with a library. Being a program so old, it makes it hard to find updates for it, if any exist. Any reason you're using this instead of something a little more modern?

llaffer

Just as 'mystic smeg' suggests, you need to compensate for a bug in Borland's CRT unit which involves a timing loop operation which unfortunately cannot be carried out the same way on newer machines. You should write some direct memory-mapped video code and avoid using the CRT Unit altogether if you really want to be free from the problem, because the patches available (Garbo has some at their site, including recompiled CRT TPU files) don't appear to work all of the time. If you want some memory-mapped video (80x25 text mode) code, here's a link: http://cqvis.zxq.net/PRG/PRGBK.html Chapter Two gives the code, which you might want to edit using KEDIT 3.52 if you have that, because of the line-graphics content in the file above ASCII 127. Feel free to use it as you wish as is; but if you modify it, it's your problem if it doesn't work.

Greater Meridian

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.