; Dim Example ; ----------- ; Dim creates an array - here, five inventory slots (indexes 0 to 4) Dim inventory$(4) ; Fill the slots inventory$(0)="Sword" inventory$(1)="Shield" inventory$(2)="Potion" inventory$(3)="Map" inventory$(4)="Lantern" ; Array elements are accessed by index, starting at 0 Print "Your inventory:" For slot=0 To 4 Print " Slot "+slot+": "+inventory$(slot) Next Print "" Print "Press any key to close the example" WaitKey End