December 2018
Beginner
452 pages
12h 17m
English
In the examples up to now, we have actually used variables as constants. The term variable implies that it can change, whereas our examples have always assigned a variable at the start of the script, and used it throughout. While that has merits of its own (as stated before, for consistency or easier editing), it does not yet utilize the full power of variables.
A constant is a variable, but a special type. Simply put, a constant is a variable defined at the start of the script that is not affected by user input and does not change value during execution.
Later in this chapter, when we discuss dealing with user input, we'll see true variables. There, the content of the variables is supplied by the caller of the script, ...