Next: , Up: Formatting Rules


13.2.1 White Space and Empty Lines

gnatpp does not have an option to control space characters. It will add or remove spaces according to the style illustrated by the examples in the Ada Reference Manual.

The only format effectors (see Ada Reference Manual, paragraph 2.1(13)) that will appear in the output file are platform-specific line breaks, and also format effectors within (but not at the end of) comments. In particular, each horizontal tab character that is not inside a comment will be treated as a space and thus will appear in the output file as zero or more spaces depending on the reformatting of the line in which it appears. The only exception is a Form Feed character, which is inserted after a pragma Page when -ff is set.

The output file will contain no lines with trailing “white space” (spaces, format effectors).

Empty lines in the original source are preserved only if they separate declarations or statements. In such contexts, a sequence of two or more empty lines is replaced by exactly one empty line. Note that a blank line will be removed if it separates two “comment blocks” (a comment block is a sequence of whole-line comments). In order to preserve a visual separation between comment blocks, use an “empty comment” (a line comprising only hyphens) rather than an empty line. Likewise, if for some reason you wish to have a sequence of empty lines, use a sequence of empty comments instead.