Menu

#217 Aligning := Operators..

None
closed-fixed
formatter (13)
5
2026-02-11
2026-01-31
Ian Branch
No

GE does a good job of aligning these:

      sEmailHeader  : string = '''
                            X-Priority: 1
                            X-MSMail-Priority: Normal
                            Importance: Normal
                            ''';
      sMyKey        = 'DBiWorkflow398333';
      sNoCorpEmail  = 'There is no Corporate Email Address recorded in the Company data!';
      sNoSvcEmail   = 'There is no Service Email Address recorded in the Company data!';
      sPrintMsg     = 'The Job Ticket not in the correct status for this print function!';

    var
      FFormInitialised: Boolean;
      FSendProgress : TSendDialogMSClassic;
      FsJobNo       : string;
      FsMode        : string;
      FJobTicketValidator: TnlhValidationBuilder;

But not so good at aligning these:

    btnCopyCustomer.Enabled := True;
    SearchFor.Enabled := False;
    IndexOrd.Enabled := False;
    mnuPrint.Enabled := False;
    mnuInspectionReportEmail.Enabled := False;
    mnuSendEmailQuote.Enabled := False;
    mnuSendEmailRepairReport.Enabled := False;
    btnGenerateCustRef.Enabled := True;
    edtHours.ReadOnly := False;
    edtMinutes.ReadOnly := False;
    DBInsert.Enabled := False;
    DBEdit.Enabled := False;
    DBPost.Enabled := True;
    DBCancel.Enabled := True;
    btnAddNoEmail.Enabled := True;

As you are seemingly on a roll with CC, perhaps you could look at an option to align the := as well?

Ian

Discussion

  • Thomas Mueller

    Thomas Mueller - 2026-02-03

    How do you propose this should work?

    Use a new setting to align assignments at a given column and then move the := of the assignments to that column, unless the left side of the assignment is longer so it does not fit? (The way it works with the variable declarations.)

    Or should there be some kind of "smart" alignment like with the const statements? (Which I currently have no idea how it works.)

    Edit: There is no "smart" involved: const an resource strings use the same position as configured for aligning var declarations.

    Forget that I asked.

     

    Last edit: Thomas Mueller 2026-02-03
  • Thomas Mueller

    Thomas Mueller - 2026-02-11
    • status: open --> closed-fixed
     
  • Thomas Mueller

    Thomas Mueller - 2026-02-11

    implemented in revision #5105. The new setting is on the Alignment tab.

     

Log in to post a comment.

MongoDB Logo MongoDB
Gen AI apps are built with MongoDB Atlas
Atlas offers built-in vector search and global availability across 125+ regions. Start building AI apps faster, all in one place.