begin as an 'After Word'
This commit is contained in:
parent
8f41c13f0f
commit
a63b1597d8
2 changed files with 44 additions and 0 deletions
11
content/BCBestPractices/Readability/_index.md
Normal file
11
content/BCBestPractices/Readability/_index.md
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
+++
|
||||||
|
title = "Readability"
|
||||||
|
weight = 980
|
||||||
|
+++
|
||||||
|
## AL Coding Guidelines
|
||||||
|
|
||||||
|
## **Readability**
|
||||||
|
|
||||||
|
Generally, all readability rules are Microsoft style choices only. You can use them to keep consistency with the existing code.
|
||||||
|
|
||||||
|
Find the AL guidelines by expanding the menu in the left.
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
+++
|
||||||
|
title = "begin as an 'After Word'"
|
||||||
|
weight = 230
|
||||||
|
+++
|
||||||
|
|
||||||
|
<_Created by Microsfot, Described by waldo_\>
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
When `begin` follows `then`, `else`, `do`, it should be on the same line, preceded by one space character.
|
||||||
|
|
||||||
|
## Bad code
|
||||||
|
|
||||||
|
```al
|
||||||
|
if ICPartnerRefType = ICPartnerRefType::"Common Item No." then
|
||||||
|
begin
|
||||||
|
...
|
||||||
|
end;
|
||||||
|
```
|
||||||
|
|
||||||
|
## Good code
|
||||||
|
|
||||||
|
```al
|
||||||
|
if ICPartnerRefType = ICPartnerRefType::"Common Item No." then begin
|
||||||
|
...
|
||||||
|
end;
|
||||||
|
```
|
||||||
|
|
||||||
|
## [Discussions](https://github.com/microsoft/alguidelines/discussions/categories/bc-best-practices?discussions_q=begin+as+an+After+Word+category%3A%22BC+Best+Practices%22)
|
||||||
|
|
||||||
|
You can find discussions on all "Best Practices" [here](https://github.com/microsoft/alguidelines/discussions/categories/bc-best-practices).
|
||||||
|
|
||||||
|
If you don't find the discussion of this pattern, please feel fee to create a new one with the same title as this article.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue