SRL Archive - General

IntToStr Error


almost

2008-04-20 21:08:13

This is really causing some problems for me…
IntToStr only works for up to a 10 digit number.
begin
WriteLn(IntToStr(Length(IntToStr(1))));
end.
Try this out and just change the number up until you are past 10 digits.

bullzeye95

2008-04-20 21:30:34

That's because an integer can only hold a value of up to 2147483647.

EDIT: I forgot to mention that if you use Int64ToStr, you can input a value of up to 9223372036854775807.

almost

2008-04-20 22:27:13

Seems very random…
But 9223372036854775807 happens to be high enough to deal with my project! =)
So thanks.