13.4 Generic constant
Declaring generic constant is quite useful in order to parameterize the configuration of a system. It is desirable to define generic constants in some critical applications such as Real_time systems, space applications, etc. Also side effects are possible in our usual programming which is a major constraint against software reusability. It is possible that the execution of a subprogram might depends on the value of some input parameter or flag from some other component. In order to avoid such problems, it is advisable to move "constant" parameters out of a subprogram and pass it as a generic formal parameter.
generic
Size_of_the_Propelsion_System : constant positive := 200;
------
package Control_system is
------
end Control_system;
Guideline1 : Where a function / procedure makes use of constants for configuration, declare as generic with generic constant parameter.