alguidelines/content/NAVPatterns/3-cal-coding-guidelines/readability/line-start-keywords/index.md
2022-02-05 19:44:44 +01:00

26 lines
505 B
Markdown

+++
title = "Line Start Keywords"
weight = 740
+++
The END, IF, REPEAT, FOR, WHILE, ELSE and CASE statement should always start a line.
Bad code
```al
IF IsContactName THEN ValidateContactName
ELSE IF IsSalespersonCode THEN ValidateSalespersonCode
ELSE IF IsSalesCycleCode THEN ValidatSalesCycleCode;
```
Good code
```al
IF IsContactName THEN
ValidateContactName
ELSE
IF IsSalespersonCode THEN
ValidateSalespersonCode
ELSE
IF IsSalesCycleCode THEN
ValidatSalesCycleCode;
```