added caption for each example

This commit is contained in:
Christian Bräunlich 2022-05-05 16:16:27 +00:00
parent 5652ea8c5d
commit 6162a121be
5 changed files with 48 additions and 24 deletions

View file

@ -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