Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Free Pascal
»
Beginners
(Moderators:
FPK
,
Tomas Hajny
) »
exitcode = 201?
Free Pascal
Website
Downloads
Wiki
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Bugtracker
IRC channel
Latest SVN
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Lomuto Quicksort is very ...
by
Blaazen
[
Today
at 10:05:31 pm]
Dialog(ue) editor
by
MarkMLl
[
Today
at 10:04:14 pm]
Codetools:cannot find uni...
by
Peter H
[
Today
at 09:28:19 pm]
request for imagesgrid co...
by
alaa123456789
[
Today
at 07:55:53 pm]
FPLite? (An alternative e...
by
FlierMate
[
Today
at 07:48:49 pm]
Translated Textbook
by
bobonwhidbey
[
Today
at 07:42:41 pm]
[SOLVED} Issue with TProc...
by
Barry55
[
Today
at 07:09:32 pm]
Turtle Graphics
by
winni
[
Today
at 05:30:33 pm]
Raspberry Pi Pico and Fre...
by
MiR
[
Today
at 05:21:29 pm]
image created at runtime ...
by
stormfinger
[
Today
at 04:56:32 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: exitcode = 201? (Read 1084 times)
coradi
Jr. Member
Posts: 91
exitcode = 201?
«
on:
October 13, 2019, 11:58:28 am »
Hi,
sorry, I don't know how I get it from Windows FPC to clipboard.
If I count X to 100 it works..if I count to 1000, then comes exitcode 201?!
It's an Integer?!
Higher than 234 doesn't work?!
IT has something to do with the inc(d); but why?
«
Last Edit: October 13, 2019, 12:07:22 pm by coradi
»
Logged
Amstrad Schneider CPC 6128
Wind XP / 7 / 10
fred
Full Member
Posts: 189
Re: exitcode = 201?
«
Reply #1 on:
October 13, 2019, 12:09:28 pm »
140 * 100 = 14000
140 * 234 = 32760
Both fit in a signed integer
140 * 1000 = 140000
Does not fit in a signed integer, 201 Range check error
https://wiki.freepascal.org/Integer
edit: added link to integer datatype
«
Last Edit: October 13, 2019, 12:17:36 pm by fred
»
Logged
Started with OmegaSoft Pascal on OS-9/68k , now Lazarus 2.0.8 / FPC 3.0.4 on Windows 7
jamie
Hero Member
Posts: 4044
Re: exitcode = 201?
«
Reply #2 on:
October 13, 2019, 06:01:58 pm »
its because integer in that mode is only 16 bit, the largest number you can use without it going to the - side is 32767.
Instead of using Integer, use LongInt; LongInt will do much more!
Logged
The only true wisdom is knowing you know nothing
coradi
Jr. Member
Posts: 91
Re: exitcode = 201?
«
Reply #3 on:
October 13, 2019, 06:19:07 pm »
Yes, thanks too both from you.
My mis thinking was..I reset with each loop the variable..but forget..d wasn't reset..and increase more and more every time
Logged
Amstrad Schneider CPC 6128
Wind XP / 7 / 10
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Free Pascal
»
Beginners
(Moderators:
FPK
,
Tomas Hajny
) »
exitcode = 201?
TinyPortal
© 2005-2018