How to fix run-time error 201

后端 未结 1 1882
感情败类
感情败类 2021-01-29 11:02

help me, please. I don\'t know how to fix this error.

Program Polynomial;

type
    arrayOfInt = Array[1..21] of Integer;
    biggerArrayOfInt = Array[1..41] of          


        
相关标签:
1条回答
  • 2021-01-29 11:44

    Runtime error 201 means range check error. Quick glance over the source code makes me suspect that somewhere some operation returns a value that doens't fit in integer range (-32786..32767 in FreePascal by default). Easiest solution would be to use a larger datatype for example longint (roughly between -2*10^9..2*10^9) or int64 (~9*10^18..9*10^18).

    If you use command line compiler using -gl command line option would display line numbers in run-time error backtraces. This would make it easier for you to pinpoint the issue.

    0 讨论(0)
提交回复
热议问题