Results 1 to 3 of 3

Thread: IntToStr Error

  1. #1
    Join Date
    Jan 2007
    Location
    Tennessee
    Posts
    642
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default IntToStr Error

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

  2. #2
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    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.

  3. #3
    Join Date
    Jan 2007
    Location
    Tennessee
    Posts
    642
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 02-26-2008, 04:14 PM
  2. IntToStr? Whats wrong here?
    By Illkillutill in forum OSR Help
    Replies: 7
    Last Post: 02-16-2008, 08:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •