8 Program Structure and Compilation Issues ¶
- Every GNAT source file must be compiled with the
-gnatg
switch to check the coding style.
(Note that you should look at
style.adb to see the lexical rules enforced by -gnatg
).
- Each source file should contain only one compilation unit.
- Filenames should be 8 or fewer characters, followed by the
.adb
extension for a body or .ads
for a spec.
- Unit names should be distinct when ‘krunch’ed to 8 characters
(see krunch.ads) and the filenames should match the unit name,
except that they are all lower case.