alguidelines/content/docs/NAVPatterns/3-cal-coding-guidelines/readability/line-start-keywords/index.md
2022-02-20 13:18:49 +01:00

505 B

+++ title = "Line Start Keywords" weight = 740 +++ The END, IF, REPEAT, FOR, WHILE, ELSE and CASE statement should always start a line.

Bad code

IF IsContactName THEN ValidateContactName
  ELSE IF IsSalespersonCode THEN ValidateSalespersonCode
    ELSE IF IsSalesCycleCode THEN ValidatSalesCycleCode;

Good code

IF IsContactName THEN
  ValidateContactName
ELSE
  IF IsSalespersonCode THEN
    ValidateSalespersonCode
  ELSE
    IF IsSalesCycleCode THEN
      ValidatSalesCycleCode;