Game Development Reference
Figure 5-15. From the kitchen to the plate: string concatenation in action!
The directive uses plus signs to join all the separate elements together to make a single cohesive
string of text. This is something known in computer programming as string concatenation , which just
means “joining text together with plus signs.” It's a very useful technique to use when you need to mix
text that doesn't change with variables that do. Because the values of the variables change, the entire
string of text updates itself accordingly. It's so simple, really, but a sort of magical thing to watch when
the program runs.
When you use plus signs to concatenate strings, they don't have any mathematical meaning—they're
just like stitches that are used to sew all the bits of text together into one long piece. In the program,
the final result of all this stitching is copied into the c]iaOp]pqo variable so you just need to use the
c]iaOp]pqo variable whenever you need to display this text. And that's exactly what the next bit of