Next: , Previous: Formatting Comments, Up: Formatting Rules

13.2.3 Construct Layout

The difference between GNAT style -l1 and compact -l2 layout on the one hand, and uncompact layout -l3 on the other hand, can be illustrated by the following examples:


GNAT style, compact layout Uncompact layout type q is record type q is a : integer; record b : integer; a : integer; end record; b : integer; end record; Block : declare Block : A : Integer := 3; declare begin A : Integer := 3; Proc (A, A); begin end Block; Proc (A, A); end Block; Clear : for J in 1 .. 10 loop Clear : A (J) := 0; for J in 1 .. 10 loop end loop Clear; A (J) := 0; end loop Clear;

A further difference between GNAT style layout and compact layout is that GNAT style layout inserts empty lines as separation for compound statements, return statements and bodies.