Chapter 2. Variables

Table of Contents
2.1. Variable Names in LPC
2.2. Variable Types in LPC
2.3. Variable Values in LPC

When you write a program or a program snippet, what you're doing is taking a series of ingredients, subjecting them to a series of manipulations, and then returning a result. That's pretty much it.

This isn't all that different from building a desk, baking bread, writing a song, or telling your mom how to setup her email client so that she doesn't get spam.

In LPC, the basic ingredient that you work with is data. Data is stored in variables. When you're baking bread, you count out specific cups of flour. Each of these cups holds flour that you can point at and manipulate. Variables work the same way.

All variables have three properties: a name, a type, and a value.

2.1. Variable Names in LPC

The name of the variable is what you'll use through your program to refer to the variable itself. The name could be something like "index" or "total_number_of_pigeons".

FIXME - write some whizbang stuff about good names and bad names for variables.