Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

uses crt and division by zero

Posted on 1999-07-06
9
Medium Priority
?
14,944 Views
Last Modified: 2011-08-18
I am running windows 98 and using Turbo Pascal 7.0 (dos version) to run and teach pascal. I would like to clear the screen so I import (use) the "crt" unit and use the "clrscr" command but everytime I try it, the program crashes and says "division by zero". What is going on here?

thanks
-Gary;
0
Comment
Question by:leopard850
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
9 Comments
 
LVL 6

Expert Comment

by:Triskelion
ID: 1218589
I would reinstall the environment (TP7)
It sounds as if you may have a corrupt Turbo.TPL or other corrupt file.
0
 
LVL 6

Expert Comment

by:kschang
ID: 1218590
Triskelion... the brains have been in those jars too long.

This is the infamous Error 200 for TP7. What happened is the older TP products, esp. the ones calling CRT component, had a TIMING routine that crashes if used on a computer that's too fast, since the timer routine returned 0 as time elapsed. See this URL: http://www.merlyn.demon.co.uk/pas-r200.htm#R200
0
 
LVL 6

Expert Comment

by:Triskelion
ID: 1218591
Oops
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 1

Expert Comment

by:mSH
ID: 1218592
Please refer to other question: What wrong????? (Q10177420)

This is CRT unit error. The variable for counter for the delay function in CRT just 16 bit, but in Pentium II 233MHz and above it will overflow. So you need a path. All available in some site:
  http://www.brain.uni-freiburg.de/~klaus/pascal/runerr200/

If U need, I'll Email it to U.


PS: Please read this: (from <a href="http://www.borland.com/devsupport/pascal/">http://www.borland.com/devsupport/pascal/</a>)

Runtime Error 200 - 'Divide by 0'

Applications that use the CRT unit may generate this error message when running on very fast machines (i.e. Pentium Pro 180 and above). The cause of this error is a timing loop that occurs as part of the initialization of the CRT unit. This timing loop counts how many clock ticks occur within the loop and then that number is divided by 55. The result of this division is a value that is too large to fit into an integer value. The 'Divide by 0' error message is the catch-all error that is displayed when this overflow occurs.

There are currently no Inprise endorsed patches for this problem. There are several user provided patches available on the internet that patch both the CRT unit as well as existing EXE files. The easiest way to obtain these patches is to go to www.altavista.digital.com and search on '+ bp7patch.zip + tppatch.zip' without the quotes.

These patches are not endorsed or supported by Inprise and are used at your own risk.

0
 

Author Comment

by:leopard850
ID: 1218594
The answer was wrong. Thanks to the people who actually did answer the question.

-Gary;
0
 
LVL 6

Expert Comment

by:My name is Mud
ID: 1218595
So for who goes the points???
0
 
LVL 6

Accepted Solution

by:
kschang earned 300 total points
ID: 1218596
As I pinpointed the cause first, I believe I do. mSH was right behind me though.
0
 

Author Comment

by:leopard850
ID: 1218597
Since you were first, you get the points. Thanks alot and I fixed the problem with my class.

-Gary;
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
On September 18, Experts Exchange launched the first installment of the Help Bell, a new feature for Premium Members, Team Accounts, and Qualified Experts. The Help Bell will serve as an additional tool to help teams increase question visibility.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question