Re:Airbus Chooses GNAT Pro Ada for Development of Unmanned A...
by kqr on Wednesday September 16, 2020 @09:46AM
(#24492665)
Or
type Something is range 0 .. 255;
And now Something'First equals 0, and Something'Last equals 255, or whatever upper bound you chose.There is no reason to hard code a magic constant for the upper end of the range anywhere.
If you're using hard coded constants instead of actual constants, you deserve the pain of changing it everywhere.
Is how you do it. Changing the higher value to 65535 or anything else won't ripple.Now, you do that in C, you've got hardcoded magic numbers all over the place and the compiler would've just silently compiled without warning. Have fund debugging that mess.