A single Ada source file can have any kind of code within it, though some compilers are more restrictive than that and use specific naming conventions (such as Rational’s .1.ada and .2.ada, or AdaCore’s .ads and .adb). Ada-C/C++ Changer is designed to handle any organization of code within source files. Furthermore, even though a source file might contain only a package spec, it might still have code that needs to be executed when the package is “elaborated.” This code will be placed in the “.c” file for the package spec. Similarly, even though a file might contain only a package body, it might have “subunits” or “inlined” subprograms that need access to its local declarations, and so those are placed in a “.h” file for the body.
MapuSoft
Comments