Next: , Up: File Name Krunching Using gnatkr


14.1 About gnatkr

The default file naming rule in GNAT is that the file name must be derived from the unit name. The exact default rule is as follows:

The reason for this exception is to avoid clashes with the standard names for children of System, Ada, Interfaces, and GNAT, which use the prefixes s- a- i- and g- respectively.

The -gnatknn switch of the compiler activates a “krunching” circuit that limits file names to nn characters (where nn is a decimal integer). For example, using OpenVMS, where the maximum file name length is 39, the value of nn is usually set to 39, but if you want to generate a set of files that would be usable if ported to a system with some different maximum file length, then a different value can be specified. The default value of 39 for OpenVMS need not be specified.

The gnatkr utility can be used to determine the krunched name for a given file, when krunched to a specified maximum length.