-
Notifications
You must be signed in to change notification settings - Fork 0
RADProgrammer Style Guide Alignment
Darian Miller edited this page Mar 14, 2021
·
1 revision
-
Align
=in constants:False
// "False" example (Default)
const
Foo = 0;
FooBar = 128;-
Align
=in initializations:False
// "False" example (Default)
var
Foo:Integer = 0;
FooBar:Integer = 128;-
Align
=in type declarations:False
// "False" example (Default)
type
TFoo = set of 1..100;
TFooBar = set of 1..250;-
Align
:=assignment operators:False
// "False" example (Default)
Foo := 0;
FooBar := 121;-
Align end-of-line comments:
FalseAlign comments located at the ends of lines
// "False" example (Default)
o := 1; //would be aligned at // if true
p := 2; //would be aligned at // if true
q := 3; //would be aligned at // if true
//not aligned as it starts a line
ch { not aligned - is not end-of-line comment } := 1;-
Align fields in properties:
False- Align fields and methods in properties
Note: this option works only if the
Line breaks in Property declarationsoption defines that each field is placed on a new line
- Align fields and methods in properties
Note: this option works only if the
// "True" example
property CustomStrings:Strings
read GetCustomStrings
write SetCustomStrings
stored CustomStringsStored;-
Align type names:
False- Align type names in
varsections and records
- Align type names in
// "False" example (Default)
var
Foo:Integer = 0;
FooBar:Integer = 128;-
Align types of parameters:
False- Note: this option works only if the
One parameter per line in function definitionsoption defines that each parameter is placed on a new line
- Note: this option works only if the
// "True" example
procedure CallMe(
Foo: Integer;
FooBar: Integer);-
Align
:before type names:False- Defines whether to align colons
:before type names. This option modifies theAlign types of parameters,Align type names, andAlign '=' in initializationsoptions.
True- align colons together with typesFalse- align only type names (Default) - Defines whether to align colons
// "True" example
var
Foo : Integer;
FooBar : Integer;-
Alignment maximum column:
60- Do not insert alignment blank spaces after the specified column
-
Maximum unaligned lines:
0- This is the maximum number of consistent unaligned lines of code allowed without ending one alignment block of lines. This option controls how to detect the end of a block of aligned lines. When the value is zero, any unaligned lines (for example, a blank line) ends the block of alignment
Note: Configuration text reproduced directly from RAD Studio, Copyright (C) 2021 Embarcadero Technologies, Inc. No claim made of ownership made, reproduced here under Fair Use purposes only.