Runtime Error 201 at fpc

删除回忆录丶 提交于 2019-11-28 14:44:28
  1. J is always 1 after the for loop.
  2. Then in the repeat loop it is decremented (to j=0).
  3. Which is unequal to 1, so it decreases once more to -1 till -32768 then it rolls over to 32767
  4. then further 32767 to 1.

In summary the repeat is done 65536 +/-1 times. The meaning of the J variable is not clear to me from the code. Comment more.

Oberon

Runtime error 201 is a range check error.

Compile with -gl and you will see where the program crashes in the runtime error. It's line 16 (z := z * 10;), meaning that your z is overflowing. Note that integer is a signed 16 bit type in FPC (maximum 2^15 - 1 = 32767).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!