From b4f8bfd3242509121d8541adaa22f7341a2f6b45 Mon Sep 17 00:00:00 2001 From: waldo1001 Date: Sat, 11 Dec 2021 08:50:31 +0100 Subject: [PATCH 1/3] CASE Action on next line --- content/BCBestPractices/case-actions/index.md | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 content/BCBestPractices/case-actions/index.md diff --git a/content/BCBestPractices/case-actions/index.md b/content/BCBestPractices/case-actions/index.md new file mode 100644 index 00000000..aabd6e9a --- /dev/null +++ b/content/BCBestPractices/case-actions/index.md @@ -0,0 +1,36 @@ ++++ +title = "CASE Action on next line" +weight = 310 ++++ + +<_Created by Microsoft, Described by waldo_\> + +## Description + +A CASE action should start on a line after the possibility. + +## Bad code + +```AL + case Letter of + 'A': Letter2 := '10'; + 'B': Letter2 := '11'; + ... +``` + +## Good code + +```AL + case Letter of + 'A': + Letter2 := '10'; + 'B': + Letter2 := '11'; + ... +``` + +## [Discussions](https://github.com/microsoft/alguidelines/discussions/categories/bc-best-practices?discussions_q=case+action+on+next+line+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 guideline, please feel fee to create a new one with the same title as this article. From a1a476e98bf3288e2f0e0005b967b2ed0657d91c Mon Sep 17 00:00:00 2001 From: waldo1001 Date: Sat, 11 Dec 2021 13:31:41 +0100 Subject: [PATCH 2/3] Move --- content/BCBestPractices/{ => Readability}/case-actions/index.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename content/BCBestPractices/{ => Readability}/case-actions/index.md (100%) diff --git a/content/BCBestPractices/case-actions/index.md b/content/BCBestPractices/Readability/case-actions/index.md similarity index 100% rename from content/BCBestPractices/case-actions/index.md rename to content/BCBestPractices/Readability/case-actions/index.md From de8c4b0241a28d0b98495926b47ffb7e0517d6d0 Mon Sep 17 00:00:00 2001 From: waldo1001 Date: Mon, 13 Dec 2021 17:17:14 +0100 Subject: [PATCH 3/3] Added End statement --- content/BCBestPractices/Readability/case-actions/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/BCBestPractices/Readability/case-actions/index.md b/content/BCBestPractices/Readability/case-actions/index.md index aabd6e9a..15417a6d 100644 --- a/content/BCBestPractices/Readability/case-actions/index.md +++ b/content/BCBestPractices/Readability/case-actions/index.md @@ -15,7 +15,7 @@ A CASE action should start on a line after the possibility. case Letter of 'A': Letter2 := '10'; 'B': Letter2 := '11'; - ... + end; ``` ## Good code @@ -26,7 +26,7 @@ A CASE action should start on a line after the possibility. Letter2 := '10'; 'B': Letter2 := '11'; - ... + end; ``` ## [Discussions](https://github.com/microsoft/alguidelines/discussions/categories/bc-best-practices?discussions_q=case+action+on+next+line+category%3A%22BC+Best+Practices%22)