rotate values in array

Blitz3D Forums/Blitz3D Programming/rotate values in array

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Lets say that you anve an array like this and you want to rotate it...
;dim the array
dim fruit(9)

for i =  0 to 9
   whatever = rand(3)
      fruit (i)=whatever
next i
; array is full


now you can read the array by simply looking at address and assigning a variable to it: G=fruit(#)

but how do you ratate values in the array? Like a slot machine?