uses crt;
……
clrscr;
编译执行以后出现
Error 200: Division by zero.
怎么办? 有没有什么设置方面的问题?

解决方案 »

  1.   

    你确信是这个 clrscr 的问题吗?你的运行环境是什么?记得 Turbo pascal 5/6/7 有个开关是控制直接写屏幕的字符缓冲区的,
    你查一查看看吧,也许在 windows 2k 等下面执行有问题
      

  2.   

    问题我已经找到了
    ==================
    下面是宝蓝公司官方网站对这个问题的解释,可恨的是居然不提供官方补丁。 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 Borland 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 Borland and are used at your own riskRuntime Error 200 - 'Divide by 0' 使用crt单元的程序会出现这样的出错提示,特别是在一些主频很高的机器上(比如:Pentium Pro 180 或者更高)。 crt单元初始化时的一条时间循环是造成这个错误的原因。 这个时间循环使用来计数循环过程中,经历了多少时间周期的,然后将该计数值除以55。由于该除法结果数值太大,而导致无法放入整型变量中。'Divide by 0' 这一提示信息就是当越界发生时出现的。 目前还没有 Borland 提供的关于这一问题的官方补丁。但是现在已经有一些用户自己制作的补丁,既可以修改crt单元,又可以修改编译好的的EXE文件的补丁。得到补丁的最容易的方法是到http://www.altavista.digital.com/   然后搜索'+ bp7patch.zip + tppatch.zip'(注意,不要有引号,我找过已经没有了!) 这里还的说明一下:在你所看到的页面上有两个install.exe,其中的一个是安装pascal7.0的,另外的一个是安装runtime包的--- 至于这个东西是干什么的我也无法说清楚,当时,这是作为第十三张盘提供的。下载的时候一定不能覆盖安装pascal7.0的。在6个月之前,7。0刚刚上传时,我没有注意到这个错误,但是后来修正了。最好安装到默认的目录下。并请注意,该版本建立的程序项是无法正常在windows 9x 中运行的。(7.0 是 1992年的产品)因此,不要选择在windows下安装。请注意,补丁的目录是默认的pascal安装路径,随着你安装路径的不同,可能需要更改。本来我想将补丁汉化,后来发现好像是经过压缩处理,无法汉化。 另外:windows 98能够正常运行。我用的就是下载的,加上补丁。