PowerAda aunitrm

From OC Systems Wiki!
Jump to: navigation, search


aunitrm - delete a unit


aunitrm [-hf] Sublibrary { -I | Name ... }


This command removes one or more units from a sublibrary.


Requests help for the command. If specified, all other options and parameters (except possibly erroneous ones) are ignored.
Indicates that the names specified are actually file names, not compilation unit names. All the units associated with each of the files are removed.
You can specify a source file name either with or without a full directory path. However a sublibrary can contain compilation units from different files with the same base name; you might have some units in the file /u/smith/the_file.ada and other units in the file /u/jones/the_file.ada. If you use the -f option to delete all units associated with the source file the_file.ada, the aunitrm command returns an error. In such a case specify the full path name for the source file.
Specifies that a list of names will be read from standard input. If the -f option is also specified, the names are interpreted as file names. Otherwise the names are interpreted as compilation unit names.
If "--" is found in a line read from standard input, the remainder of the line is ignored.
This option can appear anywhere on the command line; if you use it you cannot also specify a file name as the last command-line parameter.


Specifies the sublibrary from which the units are to be removed. If it is not in the current directory, you must provide a relative or absolute path name.
Name . . .
Specifies the names of the compilation units or source files that will be used in this remove operation.
If the -f option is specified, the name parameter refers to a source file containing the units to be removed.
If the -f option is not specified, the name parameter refers to an Ada compilation unit to be removed. Each unit name must be prefixed with either lib/ or sec/.


If the source file that contains a compilation unit contains other units as well, you cannot delete just one of the units from the library. Use the -f option, specifying the file name, to delete all the units contained in the file.

This restriction does not apply to a source file containing the specification and body of a compilation unit. Both specification and body are deleted at the same time by the aunitrm command.



the aunitrm program image


Below is a list of the possible values returned by aunitrm. Refer to Return Codes for Commands for details about the meaning of these return s.

0, 1, 2, 3, 4, 5, 99


This must be defined and indicate the powerada/ada95 directory in the PowerAda installation.


See Problems and Questions at the beginning of this Appendix.