Restructure for Docsy theme
This commit is contained in:
parent
f4a1ebc077
commit
cceb0c945e
376 changed files with 963 additions and 186 deletions
|
|
@ -0,0 +1,22 @@
|
|||
+++
|
||||
title = "Unnecessary ELSE"
|
||||
weight = 1270
|
||||
+++
|
||||
ELSE should not be used when the last action in the THEN part is an EXIT, BREAK, SKIP, QUIT, ERROR.
|
||||
|
||||
Bad code
|
||||
|
||||
```al
|
||||
IF IsAdjmtBinCodeChanged THEN
|
||||
ERROR(AdjmtBinCodeChangeNotAllowedErr,...)
|
||||
ELSE
|
||||
ERROR(BinCodeChangeNotAllowedErr,...);
|
||||
```
|
||||
|
||||
Good code
|
||||
|
||||
```al
|
||||
IF IsAdjmtBinCodeChanged THEN
|
||||
ERROR(AdjmtBinCodeChangeNotAllowedErr,...)
|
||||
ERROR(BinCodeChangeNotAllowedErr,...);
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue