[fpc-other] Underscores in numerical literals - grouping

Jürgen Hestermann juergen.hestermann at gmx.de
Wed Nov 23 13:38:05 CET 2016


Am 2016-11-23 um 13:26 schrieb Graeme Geldenhuys:
 > On 2016-11-23 12:14, Jürgen Hestermann wrote:
 >> In your screenshot you use empty lines
 >> but no comment lines to separate the blocks.
 > It makes no difference... it has the same result. See attached
 > screenshot, where I added comments using a // prefix.
 > You seem to be missing how indentation or alignment is triggered with
 > ET. It only happens when a TAB (U+0009) character is found.

Yes, I see now.
It will only be a problem when 2 (different) blocks
with elastic tabstops are directly following each other
(without a line that has no tabstops as a separator).

But this happens quite often in my code in function/procedure
declarations as I align the parameters and directly after this
the var declarations are aligned too (but not aligned to the parameter declaration):

----------------------------------------------------------------------
function MyProcedureThatDoesSomething(const Path,
                                             SourceItemName,
                                             TargetPath,
                                             TargetItemName      : MyStringType;
                                             CopyProgressRoutine : CopyProgressRoutineTyp;
                                       const Flag                : boolean;
                                         out ErrorCode           : DWord;
                                         var ItemSkipped         : boolean;
                                       const ExistingMode        : OverwriteExistingModeTyp) : boolean;
var Flags,
     VolumeS,
     VolumeT    : DWord;
     S,T        : MyStringType;
     FileEntryS,
     FileEntryT : BasicFileTyp;
     H          : hwnd;
----------------------------------------------------------------------

In this case I would need to insert an empty (or comment line) between
both blocks which I do not want in all cases.



More information about the fpc-other mailing list