|
|
|
< private / public |
Constants |
text > |
|
|
Constants are values which you 'hard-code' into the program. There are two types in Tymless, numbers and text (which must be enclosed by "double quotes"). A 'named' constant is similar to a variable, as it is a name tag to which you can assign a value. However, once assigned, a named constant cannot be changed. If you can use a named constant instead of a variable your program will run faster. To declare a named constant, use the 'constant' assignment operator == GridSize == 8 In this program, using a named constant means the size of the grid can be changed by altering just one value. |
|
< private / public |
text > |