Lỗi Exit Code 201 Trong Free Pascal

I have a task lớn write a program in Pascal. When I run the program, the result was exitcode 201.

Bạn đang xem: Lỗi exit code 201 trong free pascal

I don"t know how to fix this error.

program convertTime; uses crt; Type Jam = record hh:integer ; mm:integer ; ss:integer; end; var J : Jam; P,totaldetik,sisa : integer; begin J.hh:= 16; J.mm:= 10; J.ss:= 34; write("masukkan waktu(menit): ");read(p); totaldetik:= (J.hh*3600) + (J.mm*60) + J.ss + (p*60); J.hh:= totaldetik div 3600; sisa:= totaldetik gian lận 3600 ; J.mm:= sisa div 60; J.ss:= sisa thủ thuật 60; writeln("total the time: ",J.hh," Hour ",J.mm," Minute ",J.ss," second"); readln; end.



Highest score (default) Trending (recent votes count more) Date modified (newest first) Date created (oldest first)
As seen in other questions, the error code 201 is a range check error. Put simply, a value"s trying khổng lồ be stored where it doesn"t fit.

If, as in the linked question, you"re using the không lấy phí Pascal Compiler, integer variables are 16-bit values – they can"t go higher than 32,767.

Xem thêm: Âm Đệm Âm Chính Âm Cuối Trong Tiếng Việt, Bài Vần Có Đủ 1 Cập

Your totaldetik variable looks like it would often be higher than the limit for an integer value, so you"ll need a larger variable lớn store it in. Try making totaldetik a longint instead.



Thanks for contributing an answer khổng lồ Stack Overflow!

Please be sure lớn answer the question. Provide details and share your research!

But avoid

Asking for help, clarification, or responding to lớn other answers.Making statements based on opinion; back them up with references or personal experience.

Xem thêm: Luận Điểm Luận Cứ Là Gì ? Luận Cứ Là Gì? Luận Điểm Là Gì

To learn more, see our tips on writing great answers.

Post Your Answer Discard

By clicking “Post Your Answer”, you agree khổng lồ our terms of service, privacy policy & cookie policy


Site design / hình ảnh sản phẩm © 2022 Stack Exchange Inc; user contributions licensed under CC BY-SA. Rev2022.11.18.43041

Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device và disclose information in accordance with our Cookie Policy.