# Comments inside Curly Brackets

##### Tags:

- C/AL
- Readability

##### Categories:

- Best Practice

Never use curly bracket comments. During development, the “Block comment” functionality can be used instead. However, in production code, block comments are not recommended.

Bad code

    PeriodTxt: {Period}

Good code

    PeriodTxt: // Period

Bad code

    PROCEDURE MATRIX_OnAfterGetRecord@10(MATRIX_ColumnOrdinal : Integer);
    BEGIN
        {
        IF ShowColumnName THEN
        MatrixHeader := MatrixRecords[MATRIX_ColumnOrdinal].Name
        ELSE
        MatrixHeader := MatrixRecords[MATRIX_ColumnOrdinal].Code;
        }
        MatrixRecord := MatrixRecords[MATRIX_ColumnOrdinal];
        AnalysisValue := CalcAmt(ValueType,TRUE);
        MATRIX_CellData[MATRIX_ColumnOrdinal] := AnalysisValue;
    END;

Good code

    PROCEDURE MATRIX_OnAfterGetRecord@10(MATRIX_ColumnOrdinal : Integer);
    BEGIN
        MatrixRecord := MatrixRecords[MATRIX_ColumnOrdinal];
        AnalysisValue := CalcAmt(ValueType,TRUE);
        MATRIX_CellData[MATRIX_ColumnOrdinal] := AnalysisValue;
    END;

Last modified February 24, 2022: Added tags & categories + cleanup (5ee04366) by waldo1001