15GROUPING DATA IN ONE-DIMENSIONAL ARRAYS

image

So far you’ve worked with variables to store single pieces of information, and you’ve created some pretty awesome programs. But you can create even more amazing programs by storing lots of information in a single variable! In Small Basic, you do that by using an array.

An array is a built-in data type that lets you work with groups of data. For example, you wouldn’t build a separate closet for every pair of shoes you own (unless you’re a giant who loves shoe shopping); you’d put them all in one closet. Well, arrays let you store many pieces of data together to make it easier to work with them all at once. ...

Get Learn to Program with Small Basic now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.