19.04.2017 Views

Learn to Program with Small Basic

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

16<br />

S<strong>to</strong>ring Data <strong>with</strong><br />

Associative Arrays<br />

On social websites like Facebook and<br />

LinkedIn, people enter information in<strong>to</strong><br />

text boxes, such as their names, relationship<br />

statuses, and even regular updates <strong>to</strong> their<br />

friends (like, “Oh noes!! I just stepped on a bug, and<br />

I think I got bug poisoning!”). <strong>Program</strong>s that need <strong>to</strong><br />

search or filter this data may use associative arrays <strong>to</strong><br />

s<strong>to</strong>re the various parts of the text.<br />

In addition <strong>to</strong> the indexed arrays you used in Chapter 15, <strong>Small</strong> <strong>Basic</strong><br />

supports other types of arrays that can simplify many programming tasks.<br />

In this chapter, you’ll start by learning about associative arrays. Then you’ll<br />

learn about the Array object, use it <strong>to</strong> create some fun applications, and<br />

even turn your computer in<strong>to</strong> a poet!

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!