[futurebasic] Re: [FB] Re : [FB] Array Bounds

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 1999 : Group Archive : Group : All Groups

From: Jay Reeve <jktr@...>
Date: Sun, 6 Jun 99 16:40:00 -0500
>The most common cause of this is array zero confusion.
>If you have set arrays start at zero in the prefs then
>DIM myRecord(5)
>means that you can use
>myRecord(0) -> myRecord(4)
>which makes the five you dimmed
>have a look and check your code for this.

Your logic is good, but your memory is faulty. Unless I'm way confused, 
  DIM myRecord(5)
means that you can use
  myRecord(0) -> myRecord(5)
You have actually DIMmed 6 records. That's why, to figure array size, you 
have to use 
  arraySize = (DimNum + 1) * recordSize

Another common source of Sean's bounds error, is inadvertently using a 
different index variable --the i in myRecord(i)-- or different increment 
than intended.

Sorry I can't offer any other insight, Sean.

 =J= a  y