[futurebasic] Re : [FB] Array Bounds

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

From: AlStaff@...
Date: Sun, 6 Jun 1999 22:05:55 EDT
>I be confused...
>
>The book; "Programming the Macintosh with FutureBasic"
>
>In the "Array variables" chapter it states...
>
>The following program line creates a character string
>array with six elements, myName$(0) through myName$(5):
>
>DIM myName$(6)    'create 6-elements
>
>
>Has something changed?
>or
>Is this a misprint?
>or
>Is Rick be confused?


I turned array bounds checking on in the prefs and tried the program below. 
It generates an array error when X = 7 (X = 0 to 6 works fine), so to me it 
looks like the above is a misprint and Rick is right.

WINDOW 1
DIM a(6)
FOR X = 0 TO 7
 PRINT X, a(X)
NEXT X


Al Staffieri Jr.

AlStaff@...
http://members.aol.com/AlStaff/index.html