| Yes, CONST is very usefulMarch 24 2008 at 3:02 PM | qbguy (no login) |
Response to Some debugging techniques |
| CONST lets you give names to constants; instead of referring to pi as 3.14159265358979323846264338327950288419716939937510 at every appearance, the variable PI can be given that value with a CONST statement and used instead of the longer form of the constant. This also simplifies modifying the program, should the value of pi change.
Of course, the stupid way to use CONST is:
CONST ONE = 1
CONST TWO = 2
CONST THREE = 3
Or even worse:
CONST THOUSAND = 42
----
A computer without COBOL is like a piece of chocolate cake without ketchup. |
| | Responses |
|
|