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

26 lines
No EOL
348 B
Markdown

+++
title = "END ELSE Pair"
weight = 540
+++
The END ELSE pair should always appear on the same line.
Bad code
```al
IF OppEntry.FIND('-') THEN
IF SalesCycleStage.FIND('-') THEN BEGIN
...
END
ELSE
...
```
Good code
```al
IF OppEntry.FIND('-') THEN
IF SalesCycleStage.FIND('-') THEN BEGIN
...
END ELSE
...
```