Game Development Reference
You'll find a file called ]nn]uOa]n_d*bh] in the =nn]uOa]n_d folder of the chapter's source files. Open
it as a project and take a look at its I]ej[=nn]uOa]n_d*]o file. It uses an eb statement inside a bkn
loop to check whether the array contains an element called ikomqepk. Once the eb statement finds
the correct element, a ^na]g directive runs to stop the loop from continuing:
If you test it, you'll see this output:
Because you include a ^na]g directive, the loop stops at that point. It never checks element W.Y, which
is a good thing. The loop has found what it's looking for, so it doesn't need to check. Using bkn loops
to search arrays is a basic programming technique that you'll be using frequently from now on.
You'll need a bit of practice with arrays before you start to feel comfortable using them in your own
code. Spend a bit of time with these example files, make some changes, and follow the way your
changes affect the output.