Comments inside Curly Brackets
Categories:
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;
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
Last modified October 4, 2024: Merge pull request #249 from Busschers/ErrorHandling-ListOfReferenceText (5e76983)
by Arend-Jan Kauffmann