Join routine headers split by hand
A routine header the author split across lines is joined back onto one line; when the joined line is longer than the max length it is re-wrapped after the rightmost ';' or ',' that fits, continuing one indent step in. On by default (this is the standard behaviour).
Off gives the opposite layout: one parameter per line. Off therefore IMPLIES Break parameters one per line -- the engine treats that option as on, and the Options page shows its box checked and disabled while this one is unchecked. A header with fewer than two parameters is not broken. A // comment inside a split header still blocks the join, as before.
Independent of Reflow lines (join and wrap): turning that off does not stop headers from being joined.
Example
Real YADF output for the "JoinRoutineHeaders + BreakParamsOnePerLine" block of the preview sample (Demo\Sample.pas), all other options at their defaults:
// input
procedure ShowJoinHeader(
const AName: string;
ACount: Integer);
begin
Writeln(AName, ACount);
end;
procedure ShowBreakParams(const AName: string; ACount: Integer);
begin
Writeln(AName, ACount);
end;
// JoinRoutineHeaders = true (default)
procedure ShowJoinHeader(const AName: string; ACount: Integer);
begin
Writeln(AName, ACount);
end;
procedure ShowBreakParams(const AName: string; ACount: Integer);
begin
Writeln(AName, ACount);
end;
// JoinRoutineHeaders = false
procedure ShowJoinHeader(
const AName: string
; ACount: Integer
);
begin
Writeln(AName, ACount);
end;
procedure ShowBreakParams(
const AName: string
; ACount: Integer
);
begin
Writeln(AName, ACount);
end;
Related
- Split "A, B: T" into one per name - Split "I, J: integer;" into one line per name so the type colons align.
- Align ; at the end of declarations - Align the trailing ; of consecutive declaration lines (after "Align : in declarations").
- Break case labels one per line - Break a multi-label case arm ("a, b, c: Stmt;") into one label per line. Off by default.