added indentation
This commit is contained in:
parent
4fbfc28c9e
commit
83053e7287
6 changed files with 22 additions and 24 deletions
|
|
@ -15,7 +15,7 @@ When `begin` follows `then`, `else`, `do`, it should be on the same line, preced
|
||||||
```al
|
```al
|
||||||
if ICPartnerRefType = ICPartnerRefType::"Common Item No." then
|
if ICPartnerRefType = ICPartnerRefType::"Common Item No." then
|
||||||
begin
|
begin
|
||||||
...
|
...
|
||||||
end;
|
end;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -23,7 +23,6 @@ When `begin` follows `then`, `else`, `do`, it should be on the same line, preced
|
||||||
|
|
||||||
```al
|
```al
|
||||||
if ICPartnerRefType = ICPartnerRefType::"Common Item No." then begin
|
if ICPartnerRefType = ICPartnerRefType::"Common Item No." then begin
|
||||||
...
|
...
|
||||||
end;
|
end;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ Only use begin..end to enclose [compound statements](https://docs.microsoft.com/
|
||||||
```AL
|
```AL
|
||||||
if FindSet() then begin
|
if FindSet() then begin
|
||||||
repeat
|
repeat
|
||||||
...
|
...
|
||||||
until next() = 0;
|
until next() = 0;
|
||||||
end;
|
end;
|
||||||
```
|
```
|
||||||
|
|
@ -23,7 +23,7 @@ end;
|
||||||
```AL
|
```AL
|
||||||
if FindSet() then
|
if FindSet() then
|
||||||
repeat
|
repeat
|
||||||
...
|
...
|
||||||
until next() = 0;
|
until next() = 0;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -52,4 +52,3 @@ if X then begin
|
||||||
end else
|
end else
|
||||||
(not X)
|
(not X)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,14 +14,14 @@ Do not start a line with a binary operator.
|
||||||
|
|
||||||
```AL
|
```AL
|
||||||
"Quantity to Ship" :=
|
"Quantity to Ship" :=
|
||||||
Quantity
|
Quantity
|
||||||
- "Quantity Shipped"
|
- "Quantity Shipped"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Good code
|
## Good code
|
||||||
|
|
||||||
```AL
|
```AL
|
||||||
"Quantity to Ship" :=
|
"Quantity to Ship" :=
|
||||||
Quantity -
|
Quantity -
|
||||||
"Quantity Shipped"
|
"Quantity Shipped"
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,11 @@ The `end else` pair should always appear on the same line.
|
||||||
```al
|
```al
|
||||||
if OppEntry.Find('-') then
|
if OppEntry.Find('-') then
|
||||||
if SalesCycleStage.Find('-') then begin
|
if SalesCycleStage.Find('-') then begin
|
||||||
...
|
...
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
...
|
...
|
||||||
end;
|
end;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -28,8 +28,8 @@ The `end else` pair should always appear on the same line.
|
||||||
```al
|
```al
|
||||||
if OppEntry.Find('-') then
|
if OppEntry.Find('-') then
|
||||||
if SalesCycleStage.Find('-') then begin
|
if SalesCycleStage.Find('-') then begin
|
||||||
...
|
...
|
||||||
end else begin
|
end else begin
|
||||||
...
|
...
|
||||||
end;
|
end;
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -13,15 +13,15 @@ _Created by Microsoft, Described by waldo_
|
||||||
## Bad code
|
## Bad code
|
||||||
|
|
||||||
```al
|
```al
|
||||||
if Atom = '\>' then HasLogicalOperator := true else begin
|
if Atom = '>' then HasLogicalOperator := true else begin
|
||||||
...
|
...
|
||||||
end;
|
end;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Good code
|
## Good code
|
||||||
|
|
||||||
```al
|
```al
|
||||||
if Atom = '\>' then
|
if Atom = '>' then
|
||||||
HasLogicalOperator := true
|
HasLogicalOperator := true
|
||||||
else begin
|
else begin
|
||||||
...
|
...
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue