Results 1 to 2 of 2

Thread: Dynamic Array overflow

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2000
    Location
    Tennessee
    Posts
    279

    Question

    This is my first excursion into dynamic arrays. When I run this code I get an overflow error. I realized it may have something to do with datatype incompatibility so I
    changed the array to a LONG with the same results. Any ideas?

    By the way, txtEnding and txtBeginning are 13 - digit serial numbers.

    v = (txtEnding.Text - txtBeginning.Text)
    ReDim Preserve strSeqArray(v + 1)
    strSeqArray(0) = txtBeginning.Text
    For p = 1 To v
    strSeqArray(p) = txtBeginning.Text + p
    Next p
    A cynic knows the price of everything but the value of nothing.

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    long datatype is a signed 32 bit integer which means you can have values from -2^31 to 2^31-1 which is 2147483647. for 13 digits try currency
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

Posting Permissions

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



Click Here to Expand Forum to Full Width