ADA.FORMAT(1) — HP-UX
Series 300 Only
NAME
ada.format − Ada source program reformatter
SYNOPSIS
ada.format [ -c ] [ -k ] [ -i ] [ -m ] [ -p ] [ -s ] [ -t n ] file
DESCRIPTION
Ada.format is a tool that takes an Ada source file and produces a listing of the reformatted source on standard output. It requires the source file suffix to be .adx, where x is any one character. If the source contains any syntax errors, ada.format terminates with a diagnostic error message and a line number indicating where the first error occurred. No listing of the reformatted source is generated.
By default, ada.format reformats the Ada source file according to the syntactic structure used in the Reference Manual for the Ada Programming Language. The extent and nature of the transformations performed can be optionally controlled by specifying ada.format options and by using pragma INDENT within the source file to protect regions of source from being reformatted.
The following options are recognized:
−c Capitalize the first letter of each word component (separated by underscore) of an identifier. (By default, identifiers are converted to uppercase. See −i and −s.)
−i All identifiers are converted to lowercase. (By default, identifiers are converted to uppercase. See −c and −s.)
−k All Ada keywords are converted to uppercase. (By default, keywords are converted to lowercase.)
−m Parameters of unspecified mode (by implication, mode in) are converted to explicit in parameters. Note that if either the specification or body of a unit is reformatted with this option while the other is not, the compiler indicates that the two parameter specifications do not conform, according to the Reference Manual for the Ada Programming Language [6.3.1 (8)].
−p The source structure is preserved so that each source line is treated as an indivisible entity. The source structure is indented according to its lexical elements, but individual source lines are not restructured.
−s All of the identifiers are preserved as in the source file. (By default, identifiers are converted to uppercase. See −c and −i.)
−t n Use n spaces for indentation (legal range 2..6, default 3).
Use of the pragma INDENT in the source file has the following effects:
pragma INDENT (OFF); Disable the formatter so that subsequent source lines are not reformatted.
pragma INDENT (ON); Enable the formatter so that subsequent source lines are reformatted.
Environment Variables
Two environment variables, ADA_PATH and ADA_PREDEF_LIB, are associated with all components of the Ada compilation system. Both must be set properly and exported before any component of the Ada compilation system (including ada.format) can be used (see ada(1), Environment Variables).
AUTHOR
Ada.format was developed by HP and Alsys.
FILES
$ADA_PATH/ada.format.bin
Ada source program reformatter subprocess.
SEE ALSO
ada(1), ada.fmgr(1), ada.mklib(1), ada.mvlib(1), ada.protect(1), ada.probe(1), ada.rmlib(1), ada.umgr(1), ada.unlock(1), ada.xref(1).
Ada Tools Manual, HP Part No. 98860-90020.
Ada User’s Guide (Series 300), HP Part No. 98860-90000.
INTERNATIONAL SUPPORT
8-bit file names.
Hewlett-Packard Company — May 11, 2021