iccfmt [qualifier(s)] [Ada source file(s)]
The Ada source file(s) may be specified with or without the .ada extension.
Least-matching on options is supported; hence, only enough characters to uniquely identify the option need to be typed.
Format:
-output=<name>
Specifies the output file name. By default, the output is written to a file in the current working directory with same name and an extension of .fmt. This qualifier may not be specified when formatting multiple Ada source files.
Format:
-comment_column=<number>
Defines the column position for comments. The default is column 40. iccfmt attempts to place all comments beginning at this column. If a comment is too wide to fit the page (as defined by the -page_width qualifier), then it is placed at the current indentation column. If a comment appears at the end of a line ending with a semicolon, the comment is placed on that line if there is room. Otherwise, it is placed on the following line. If there are several comments in a group, this applies to the whole group, not just the individual comments. For example, if a comment group consists of five lines, one of which is too long to be placed at the specified column, then the entire group will be placed at the current indentation column. Comment lines too long for the specified page width are not split.
Comment placement is not perfect. Comments appearing on the last line of a block construct (if/then, loops, etc.) will appear after the end of the construct. Comments just before a begin (or the first statement of a block construct) will be placed after the statement. Blank lines between comments are ignored; the comments will be treated as a single group.
It is recommended that comments not appear in the middle of any statement or declaration. This includes using comments on each line to identify each item of a parameter list in a subprogram declaration.
Format:
-context_column=<number>
Defines the column position for with/use clauses. The default is column 1. Both the with clause and the associated use clause are placed on the same line if there is enough room.
const_str : constant STRING(1..7) := "ABCDEFG";
will be printed as
const_str : constant STRING(1 .. 7) := "ABCDEFG";
Format:
-page_width=<number>
Defines the page width. The default is 79.
Format:
-indentation=<number>
Defines the number of columns to indent for constructs such as the if statement and loops. The default indentation is 3. The indentation level for each construct (if, for, loop, pragma, and while blocks) can also be set individually. See - if_indent, -for_indent, - while_indent, -loop_indent, and - pragma_indent.
Format:
-if_indent=<number>
Defines the indentation level for the if statement. If this qualifier is not specified, the indentation level is that specified by the -indentation qualifier.
Format:
-for_indent=<number>
Defines the indentation level for for loops. If this qualifier is not specified, the indentation level is that specified by the -indentation qualifier.
Format:
-loop_indent=<number>
Defines the indentation level for loop blocks. If this qualifier is not specified, the indentation level is that specified by the -indentation qualifier.
Format:
-pragma_indent=<number>
Defines the indentation level for pragma statements. In the case of pragma if blocks, all the statements inside the block will also be indented. This, however, will cause unpredictable results in cases where the statements are not well nested (see Section 5). If this qualifier is not specified, the indentation level is that specified by the -indentation qualifier.
Format:
-while_indent=<number>
Defines the indentation level for while loops. If this qualifier is not specified, the indentation level is that specified by the -indentation qualifier.
For these qualifiers, the valid values for casing are:
upper | lower | mixed | untouched |
Format:
-declaration_case=<casing>
Defines the casing for declaration names. The default is to leave the casing untouched.
Format:
-keyword_case=<casing>
Defines the casing for keywords (e.g., procedure, begin, if, etc.). The default is lower case.
Format:
-object=<casing>
Defines the casing for identifiers when they are referenced. The default is to leave the casing untouched.
Format:
-unit=<casing>
Defines the casing for unit names in with and use clauses. The default is to leave the casing untouched.
Format:
-aggregate= single paragraph
Defines the format for simple lists; for example, an assignment to an array. single results in each element assignment being printed on a separate line. paragraph results in the entire assignment being printed in the form of a paragraph and is the default.
Format:
-enumeration=single multi paragraph
Defines the format for enumeration types. single results in each item of the enumeration appearing on a separate line paragraph results in the entire enumeration being printed as a single paragraph (i.e., as though it were text). multi results in the enumeration being printed in a columnar format. The default is multi.
© 1999 Irvine Compiler Corporation