?REDIM'D ARRAY ERROR
Apple Retro Computer
Severity: MinorWhat Does This Error Mean?
?REDIM'D ARRAY in Applesoft means a DIM statement was hit for an array that already existed.
Most often, an array was used implicitly with a default size of 11, and then DIM was called later.
Or DIM is inside a loop that runs more than once.
Either DIM at the very start of the program, or use CLEAR before re-DIM.
Affected Models
- Apple II
- Apple II Plus
- Apple IIe
- Apple IIc
- Apple IIc Plus
- Apple IIGS
Common Causes
- Array used (e.g. A(5) = 0) before DIM A(20)
- DIM statement inside a FOR/NEXT or GOSUB loop
- Two DIM statements for the same name
- Array created in subroutine and re-DIMmed in main
How to Fix It
-
Find the DIM statement.
Note the line number from the error.
LIST that line.
Look earlier in the listing for any reference to the same array name — if you see one before the DIM, that's your bug. -
Move all DIM statements to the very top.
Best practice: line 10 (or near it) holds every DIM you'll need.
That way the array exists before any code uses it.
10 DIM A(100), B$(50), C(20,20). -
If DIM must run inside a loop: use CLEAR.
CLEAR resets all variables and arrays.
Then DIM is fresh.
But CLEAR also wipes other variables — only use it when you really need the reset. -
Check for hidden array references.
Statements like LET A(0) = 1 implicitly DIM A as size 11.
If your DIM A(50) comes later, REDIM'D fires.
Search the listing for every (occurrence — that's where arrays are touched.
Frequently Asked Questions
Why does Applesoft default array size to 11 when not DIM'd?
A bare A(5) = 1 creates A with size 11 (indices 0 through 10).
It saves typing for short arrays but causes REDIM'D errors when you later add DIM.
Always DIM explicitly, even for small arrays — clearer code, no surprises.