|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
v |
In
programming we often need to use various
|
|
|
constants,
e.g. RGB combinations, the number of
|
|
|
steps
to take in a squiral, etc.
|
|
|
v |
It
is good programming practice to give names to
|
|
|
these,
rather than embedding the constants in your
|
|
|
code.
|
|
|
v |
Advantages:
|
|
|
|
o |
Putting
them at the beginning of your code makes it easier to
|
|
find
and change them.
|
|
|
|
o |
If
you use the constant in several places and want to change
|
|
|
it,
there’s just one place to change.
|
|