previous up next index Irvine Compiler Logo
Previous: 1 General Description Up: User's Guide for the Next: 3 Ada95 Features

2 Invocation

FORMAT

iccfmt [qualifier(s)] [Ada source file(s)]

The Ada source file(s) may be specified with or without the .ada extension.

OPTIONS

Least-matching on options is supported; hence, only enough characters to uniquely identify the option need to be typed.

-ada83--Specifies that the source file contains Ada83 syntax (i.e., the six Ada95 keywords may be used as identifiers). The default is -ada95.

-ada95--Specifies that the source file contains Ada95 syntax. The default is -ada95.

-help--Displays a summary of the iccfmt invocation, qualifiers, and qualifier default values.

-output

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.

-quiet--Executes quietly.

PAGE FORMATTING OPTIONS

-comment_column

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.

-context_column

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.

-dotdot--Pads both sides of ``..'' constructs with spaces. For example, if - dotdot is specified on the command line, the declaration

     const_str : constant STRING(1..7) := "ABCDEFG";

will be printed as

     const_str : constant STRING(1 .. 7) := "ABCDEFG";

-pad_aggregate--Pads both sides of a parenthesized aggregate with spaces.

-page_width

Format:

-page_width=<number>

Defines the page width. The default is 79.

-parameter_align--Enables parameter mode alignment. The default is not to align parameter modes. When enabled, iccfmt will attempt to place all parameter mode keywords (e.g., in, out, in out) in the same column within a subprogram declaration.

-strip_comments--Strips the source code of all comments. The default is to include comments within the generated source code. Comment placement is not perfect. 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.

INDENTATION OPTIONS

-indentation

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.

-if_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.

-for_indent

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.

-loop_indent

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.

-pragma_indent

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.

-while_indent

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.

ALPHABETIC CASING OPTIONS

For these qualifiers, the valid values for casing are:

upper lower mixed untouched  

-declaration_case

Format:

-declaration_case=<casing>

Defines the casing for declaration names. The default is to leave the casing untouched.

-keyword_case

Format:

-keyword_case=<casing>

Defines the casing for keywords (e.g., procedure, begin, if, etc.). The default is lower case.

-object_case

Format:

-object=<casing>

Defines the casing for identifiers when they are referenced. The default is to leave the casing untouched.

-unit_case

Format:

-unit=<casing>

Defines the casing for unit names in with and use clauses. The default is to leave the casing untouched.

FORMATTING OPTIONS

-aggregate_format

Format:

-aggregate= single $\vert$ 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.

-enumeration_format

Format:

-enumeration=single $\vert$ multi $\vert$ 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.


previous up next index
Previous: 1 General Description Up: User's Guide for the Next: 3 Ada95 Features

© 1999 Irvine Compiler Corporation
2000-05-04