Difference between revisions of "Introduction to Pluggy Arrays"

Tables look better centered, IMO
imported>Speedo
imported>Speedo
(Tables look better centered, IMO)
Line 5: Line 5:


An example array containing 6 integer elements:
An example array containing 6 integer elements:
{| border="2" cellpadding="5" cellspacing="0"
{| align="center" border="2" cellpadding="5" cellspacing="0"
|- align="center"
|- align="center"
!style="background:#ffdead;"|Index  
!style="background:#ffdead;"|Index  
Line 47: Line 47:
Such flexibility allows you to store a large variety of information within a single array, rather than needing multiple arrays; you need only keep track of which index stores what information.  For example, if you wanted to store information about an item, in this case a gold coin, you might want to use an array that contained:
Such flexibility allows you to store a large variety of information within a single array, rather than needing multiple arrays; you need only keep track of which index stores what information.  For example, if you wanted to store information about an item, in this case a gold coin, you might want to use an array that contained:


{| border="2" cellpadding="5" cellspacing="0"
{| align="center" border="2" cellpadding="5" cellspacing="0"
|-
|- align="center"
!style="background:#ffdead;"|Index  
!style="background:#ffdead;"|Index  
!style="background:#ffeded;"|Value
!style="background:#ffeded;"|Value
Anonymous user