I know we can define constants within the "compiler options" area for use within compiler directives in source code, but I believe it may also be useful to be able to define special constants within the source for use within the "compiler options" area (the reverse direction of what we have now).
For example, I would like to be able to add something like the following to the head of my source code:
Code: Select all
#VERSION_MAJOR = 1
#VERSION_MINOR = 0
#VERSION_BUILD = 7
#VERSION_REVISION = 17
#VERSION_SPECIAL_MAJOR = 1
#VERSION_SPECIAL_MINOR = 2
; and so on ...
If any files are included that also define the same constants, then a compile-time error could be generated - duplicate definition.
This would permit easier version numbering within our source code, and so would be more likely to be kept up-to-date. The current facility is slightly long-winded in terms of ease of use, especially when compiling alternative versions such as special or private builds.
I hope what I am saying makes sense