Merge pull request #176 from christianbraeunlich/example-structure
This commit is contained in:
commit
51ff02f7cd
5 changed files with 48 additions and 24 deletions
|
|
@ -8,7 +8,9 @@ _Created by Microsoft, Described by waldo_
|
|||
|
||||
Only use begin..end to enclose [compound statements](https://docs.microsoft.com/en-us/cpp/c-language/compound-statement-c?view=msvc-170#:~:text=A%20compound%20statement%20%28also%20called%20a%20%22block%22%29%20typically,appear%20at%20the%20head%20of%20a%20compound%20statement.).
|
||||
|
||||
## Bad code
|
||||
## Example 1
|
||||
|
||||
### Bad code
|
||||
|
||||
```AL
|
||||
if FindSet() then begin
|
||||
|
|
@ -18,7 +20,7 @@ if FindSet() then begin
|
|||
end;
|
||||
```
|
||||
|
||||
## Good code
|
||||
### Good code
|
||||
|
||||
```AL
|
||||
if FindSet() then
|
||||
|
|
@ -27,7 +29,9 @@ if FindSet() then
|
|||
until next() = 0;
|
||||
```
|
||||
|
||||
## Bad code
|
||||
## Example 2
|
||||
|
||||
### Bad code
|
||||
|
||||
```AL
|
||||
if IsAssemblyOutputLine then begin
|
||||
|
|
@ -35,7 +39,7 @@ if IsAssemblyOutputLine then begin
|
|||
end;
|
||||
```
|
||||
|
||||
## Good code
|
||||
### Good code
|
||||
|
||||
```AL
|
||||
if IsAssemblyOutputLine then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue