CLEAR ALL
n=30
DIM a(n)
FOR i=1 TO n:a(i)=i:NEXT i
d$="Array":GOSUB printArray
ARRAY INSERT a(n/2),1000
d$="Array Insert":GOSUB printArray
ARRAY DELETE a(n/2)
d$="Array Delete":GOSUB printArray
ARRAY REVERSE a() SLICE 1,n
d$="Array Reverse":GOSUB printArray
ARRAY SHUFFLE a() SLICE 1,n
d$="Array Shuffle":GOSUB printArray
ARRAY SORT a() SLICE 1,n
d$="Array Sort":GOSUB printArray
END
printArray:
CLS
INK RGB(255,255,255)
PRINT LINE CENTER d$,,RGB(0,0,255)
FOR i=1 TO n:PRINT a(i):NEXT i
GETKEY a$
RETURN
