deploy: 9e06f72056
This commit is contained in:
parent
de09820554
commit
e4f08bf9a7
187 changed files with 6620 additions and 6342 deletions
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>By Reference Parameters :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506469 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506469></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/design/by-reference-parameters/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506469></script>
|
||||
<script src=/js/auto-complete.js?1644506469></script>
|
||||
<script src=/js/search.js?1644506469></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -258,19 +258,19 @@ ALGuidelines.Dev
|
|||
<p>Do not declare parameters by reference if their values are not intended to be changed.</p>
|
||||
<p>Unintentional value changes might propagate. Also, it might lead people to believe that value changes are intended.</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>LOCAL PROCEDURE ShowMessage@15(VAR Text@1000 : Text\[250\]);
|
||||
<pre><code>LOCAL PROCEDURE ShowMessage@15(VAR Text@1000 : Text[250]);
|
||||
BEGIN
|
||||
Text := GetMessageText;
|
||||
IF (Text <\> '') AND GenJnlLineInserted THEN
|
||||
MESSAGE(Text);
|
||||
Text := GetMessageText;
|
||||
IF (Text <> '') AND GenJnlLineInserted THEN
|
||||
MESSAGE(Text);
|
||||
END;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>LOCAL PROCEDURE ShowMessage@15(Text@1000 : Text\[250\]);
|
||||
<pre><code>LOCAL PROCEDURE ShowMessage@15(Text@1000 : Text[250]);
|
||||
BEGIN
|
||||
Text := GetMessageText;
|
||||
IF (Text <\> '') AND GenJnlLineInserted THEN
|
||||
MESSAGE(Text);
|
||||
Text := GetMessageText;
|
||||
IF (Text <> '') AND GenJnlLineInserted THEN
|
||||
MESSAGE(Text);
|
||||
END;
|
||||
</code></pre>
|
||||
<footer class=footline>
|
||||
|
|
@ -285,12 +285,12 @@ END;
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506469></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506469></script>
|
||||
<script src=/js/featherlight.min.js?1644506469></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506469></script>
|
||||
<script src=/js/relearn.js?1644506469></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Class Coupling :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506469 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506469></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/design/class-coupling/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506469></script>
|
||||
<script src=/js/auto-complete.js?1644506469></script>
|
||||
<script src=/js/search.js?1644506469></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -257,7 +257,7 @@ ALGuidelines.Dev
|
|||
<h1>Class Coupling</h1>
|
||||
<p>Do not write functions that have high class coupling. This makes the code hard to maintain.</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>Any procedure / trigger that has class coupling of \> 30
|
||||
<pre><code>Any procedure / trigger that has class coupling of > 30
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>Any procedure / trigger that has class coupling of <= 30\.
|
||||
|
|
@ -277,12 +277,12 @@ Class coupling is computed by summing the unique instances of the following in a
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506469></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506469></script>
|
||||
<script src=/js/featherlight.min.js?1644506469></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506469></script>
|
||||
<script src=/js/relearn.js?1644506469></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Cyclomatic Complexity :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506469 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506469></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/design/cyclomatic-complexity/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506469></script>
|
||||
<script src=/js/auto-complete.js?1644506469></script>
|
||||
<script src=/js/search.js?1644506469></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -257,7 +257,7 @@ ALGuidelines.Dev
|
|||
<h1>Cyclomatic Complexity</h1>
|
||||
<p>Do not write functions that have high cyclomatic complexity. This makes the code hard to maintain.</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>Any procedure / trigger that has a cyclomatic complexity \> 25, using the CC3 version mentioned in [this article][anchor0].
|
||||
<pre><code>Any procedure / trigger that has a cyclomatic complexity > 25, using the CC3 version mentioned in [this article][anchor0].
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>Any procedure / trigger that has a cyclomatic complexity <= 25, using the CC3 version.
|
||||
|
|
@ -277,12 +277,12 @@ The CC3 version is computed by summing the following in a code block:
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506469></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506469></script>
|
||||
<script src=/js/featherlight.min.js?1644506469></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506469></script>
|
||||
<script src=/js/relearn.js?1644506469></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Encapsulate Local Functionality :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506469 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506469></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/design/encapsulate-local-functionality/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506469></script>
|
||||
<script src=/js/auto-complete.js?1644506469></script>
|
||||
<script src=/js/search.js?1644506469></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -268,12 +268,12 @@ ALGuidelines.Dev
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506469></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506469></script>
|
||||
<script src=/js/featherlight.min.js?1644506469></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506469></script>
|
||||
<script src=/js/relearn.js?1644506469></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>FINDSET FINDFIRST FINDLAST :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506469 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506469></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/design/findset-findfirst-findlast/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506469></script>
|
||||
<script src=/js/auto-complete.js?1644506469></script>
|
||||
<script src=/js/search.js?1644506469></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -258,23 +258,23 @@ ALGuidelines.Dev
|
|||
<p>FINDSET, FIND('+') or FIND('-') should only be used when NEXT is used and vice versa.</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>IF Cust.FIND('-') THEN
|
||||
ERROR(CustIsBlockErr)
|
||||
ERROR(CustIsBlockErr)
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF Cust.FINDFIRST THEN
|
||||
ERROR(CustIsBlockErr)
|
||||
ERROR(CustIsBlockErr)
|
||||
</code></pre>
|
||||
<p>Bad code</p>
|
||||
<pre><code>IF Cust.FINDFIRST THEN
|
||||
REPEAT
|
||||
...
|
||||
UNTIL Cust.NEXT = 0;
|
||||
REPEAT
|
||||
...
|
||||
UNTIL Cust.NEXT = 0;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF Cust.FINDSET THEN
|
||||
REPEAT
|
||||
...
|
||||
UNTIL Cust.NEXT = 0;
|
||||
REPEAT
|
||||
...
|
||||
UNTIL Cust.NEXT = 0;
|
||||
</code></pre>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
|
|
@ -288,12 +288,12 @@ UNTIL Cust.NEXT = 0;
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506469></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506469></script>
|
||||
<script src=/js/featherlight.min.js?1644506469></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506469></script>
|
||||
<script src=/js/relearn.js?1644506469></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -6,16 +6,16 @@
|
|||
<link rel=alternate type=application/rss+xml href=/navpatterns/3-cal-coding-guidelines/design/index.xml title="AL Guidelines">
|
||||
<meta name=description content>
|
||||
<title>Design :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506471 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506471></script>
|
||||
<link href=/css/nucleus.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600601 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600601></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/design/>
|
||||
|
|
@ -33,9 +33,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506471></script>
|
||||
<script src=/js/auto-complete.js?1644506471></script>
|
||||
<script src=/js/search.js?1644506471></script>
|
||||
<script src=/js/lunr.min.js?1644600601></script>
|
||||
<script src=/js/auto-complete.js?1644600601></script>
|
||||
<script src=/js/search.js?1644600601></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -275,12 +275,12 @@ ALGuidelines.Dev
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506471></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506471></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506471></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506471></script>
|
||||
<script src=/js/featherlight.min.js?1644506471></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506471></script>
|
||||
<script src=/js/relearn.js?1644506471></script>
|
||||
<script src=/js/clipboard.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600601></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600601></script>
|
||||
<script src=/js/featherlight.min.js?1644600601></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600601></script>
|
||||
<script src=/js/relearn.js?1644600601></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Design on AL Guidelines</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/</link><description>Recent content in Design on AL Guidelines</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><atom:link href="https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/index.xml" rel="self" type="application/rss+xml"/><item><title>By Reference Parameters</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/by-reference-parameters/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/by-reference-parameters/</guid><description>Do not declare parameters by reference if their values are not intended to be changed.
|
||||
Unintentional value changes might propagate. Also, it might lead people to believe that value changes are intended.
|
||||
Bad code
|
||||
LOCAL PROCEDURE ShowMessage@15(VAR Text@1000 : Text\[250\]); BEGIN Text := GetMessageText; IF (Text &lt;\&gt; '') AND GenJnlLineInserted THEN MESSAGE(Text); END; Good code
|
||||
LOCAL PROCEDURE ShowMessage@15(Text@1000 : Text\[250\]); BEGIN Text := GetMessageText; IF (Text &lt;\&gt; '') AND GenJnlLineInserted THEN MESSAGE(Text); END;</description></item><item><title>Class Coupling</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/class-coupling/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/class-coupling/</guid><description>Do not write functions that have high class coupling. This makes the code hard to maintain.
|
||||
LOCAL PROCEDURE ShowMessage@15(VAR Text@1000 : Text[250]); BEGIN Text := GetMessageText; IF (Text &lt;&gt; '') AND GenJnlLineInserted THEN MESSAGE(Text); END; Good code
|
||||
LOCAL PROCEDURE ShowMessage@15(Text@1000 : Text[250]); BEGIN Text := GetMessageText; IF (Text &lt;&gt; '') AND GenJnlLineInserted THEN MESSAGE(Text); END;</description></item><item><title>Class Coupling</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/class-coupling/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/class-coupling/</guid><description>Do not write functions that have high class coupling. This makes the code hard to maintain.
|
||||
Bad code
|
||||
Any procedure / trigger that has class coupling of \&gt; 30 Good code
|
||||
Any procedure / trigger that has class coupling of &gt; 30 Good code
|
||||
Any procedure / trigger that has class coupling of &lt;= 30\. Class coupling is computed by summing the unique instances of the following in a code block: - every unique usage of a complex C/AL data type (table, codeunit, etc) as 1\.</description></item><item><title>Cyclomatic Complexity</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/cyclomatic-complexity/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/cyclomatic-complexity/</guid><description>Do not write functions that have high cyclomatic complexity. This makes the code hard to maintain.
|
||||
Bad code
|
||||
Any procedure / trigger that has a cyclomatic complexity \&gt; 25, using the CC3 version mentioned in [this article][anchor0]. Good code
|
||||
Any procedure / trigger that has a cyclomatic complexity &gt; 25, using the CC3 version mentioned in [this article][anchor0]. Good code
|
||||
Any procedure / trigger that has a cyclomatic complexity &lt;= 25, using the CC3 version. The CC3 version is computed by summing the following in a code block: - each IF statement as 1\.</description></item><item><title>Encapsulate Local Functionality</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/encapsulate-local-functionality/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/encapsulate-local-functionality/</guid><description>Any function used local must be defined as local.</description></item><item><title>FINDSET FINDFIRST FINDLAST</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/findset-findfirst-findlast/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/findset-findfirst-findlast/</guid><description>FINDSET, FIND('+') or FIND('-') should only be used when NEXT is used and vice versa.
|
||||
Bad code
|
||||
IF Cust.FIND('-') THEN ERROR(CustIsBlockErr) Good code
|
||||
|
|
@ -19,7 +19,7 @@ PROCEDURE SetPurchLine@22(VAR CurrentPurchLine@1000 : Record 39); VAR Pegging@10
|
|||
PROCEDURE SetPurchLine@22(VAR CurrentPurchLine@1000 : Record 39); VAR Pegging@1001 : Boolean; BEGIN Pegging := IsPegging(CurrentPurchLine); IF Pegging THEN CurrQuantity := CurrentPurchLine.&quot;Quantity (Base)&quot; ELSE CurrQuantity := CurrentPurchLine.&quot;Outstanding Qty. (Base)&quot;; END; Bad code</description></item><item><title>Maintainability Index</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/maintainability-index/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/maintainability-index/</guid><description>Maintainability Index: Do not write functions that have a very low maintainability index. This makes the code hard to maintain.
|
||||
Bad code
|
||||
Any procedure / trigger that has a maintainability index &lt; 20 Good code
|
||||
Any procedure / trigger that has a maintainability index \&gt;= 20\. The Maintainability Index is computed as a function: - Lines Of Code (inverse proportional) - the Halstead Volume - Cyclomatic Complexity (inverse proportional). More info</description></item><item><title>Parameter Placeholders</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/parameter-placeholders/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/parameter-placeholders/</guid><description>The number of parameters passed to a string must match the placeholders.
|
||||
Any procedure / trigger that has a maintainability index &gt;= 20\. The Maintainability Index is computed as a function: - Lines Of Code (inverse proportional) - the Halstead Volume - Cyclomatic Complexity (inverse proportional). More info</description></item><item><title>Parameter Placeholders</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/parameter-placeholders/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/parameter-placeholders/</guid><description>The number of parameters passed to a string must match the placeholders.
|
||||
Bad code
|
||||
CannotDeleteLineErr@1005 : TextConst 'ENU=You cannot delete this line because one or more rating values exists.'; ... ERROR(CannotDeleteLineErr,TABLECAPTION); Good code
|
||||
CannotDeleteLineErr@1005 : TextConst 'ENU=You cannot delete this line because one or more rating values exists.'; ... ERROR(CannotDeleteLineErr); Bad code
|
||||
|
|
@ -29,22 +29,22 @@ LOCAL PROCEDURE Code@1(); VAR CAJnlPostBatch@1001 : Codeunit 1103; BEGIN CAJnlPo
|
|||
LOCAL PROCEDURE Code@1(); BEGIN CODEUNIT.RUN(CODEUNIT::&quot;CA Jnl.-Post Batch&quot;,CostJnlLine); END;</description></item><item><title>Unreachable Code</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/unreachable-code/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/unreachable-code/</guid><description>Do not write code that will never be hit.
|
||||
It affects code readability and can lead to wrong assumptions.
|
||||
Bad code
|
||||
IF Type &lt;\&gt; Type::FIELD THEN BEGIN ... ERROR(...); RecRef.CLOSE; END; Good code
|
||||
IF Type &lt;\&gt; Type::FIELD THEN BEGIN ... RecRef.CLOSE; ERROR(...); END;</description></item><item><title>Unused Initialized Variables</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/unused-initialized-variables/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/unused-initialized-variables/</guid><description>The value assigned to a variable must be used. Else the variable is not necessary.
|
||||
IF Type &lt;&gt; Type::FIELD THEN BEGIN ... ERROR(...); RecRef.CLOSE; END; Good code
|
||||
IF Type &lt;&gt; Type::FIELD THEN BEGIN ... RecRef.CLOSE; ERROR(...); END;</description></item><item><title>Unused Initialized Variables</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/unused-initialized-variables/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/unused-initialized-variables/</guid><description>The value assigned to a variable must be used. Else the variable is not necessary.
|
||||
Bad code
|
||||
PROCEDURE AddEntities@1(FilterStr@1000 : Text\[250\]); VAR Vendor@1001 : Record 23; Count@1002 : Integer; BEGIN Count := 0; Vendor.SETFILTER(&quot;No.&quot;,FilterStr); IF Vendor.FINDSET THEN REPEAT &quot;User ID&quot; := USERID; &quot;Vendor No.&quot; := Vendor.&quot;No.&quot;; IF INSERT THEN Count += 1; UNTIL Vendor.NEXT = 0; END; Good code
|
||||
PROCEDURE AddEntities@1(FilterStr@1000 : Text\[250\]); VAR Vendor@1001 : Record 23; BEGIN Vendor.</description></item><item><title>Unused Variables</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/unused-variables/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/unused-variables/</guid><description>Do not declare variables that are unused.
|
||||
PROCEDURE AddEntities@1(FilterStr@1000 : Text[250]); VAR Vendor@1001 : Record 23; Count@1002 : Integer; BEGIN Count := 0; Vendor.SETFILTER(&quot;No.&quot;,FilterStr); IF Vendor.FINDSET THEN REPEAT &quot;User ID&quot; := USERID; &quot;Vendor No.&quot; := Vendor.&quot;No.&quot;; IF INSERT THEN Count += 1; UNTIL Vendor.NEXT = 0; END; Good code
|
||||
PROCEDURE AddEntities@1(FilterStr@1000 : Text[250]); VAR Vendor@1001 : Record 23; BEGIN Vendor.</description></item><item><title>Unused Variables</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/unused-variables/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/unused-variables/</guid><description>Do not declare variables that are unused.
|
||||
Unused variables affect readability.
|
||||
Bad code
|
||||
PROCEDURE CheckPostingDate@23(CaptionEntryNo@1005 : Text\[50\]); BEGIN IF GenJnlCheckLine.DateNotAllowed(PostingDate) THEN ERROR(DateNotAllowedErr,Caption,EntryNo) IF PostingDate \&gt; MaxPostingDate THEN MaxPostingDate := PostingDate; END Good code
|
||||
PROCEDURE CheckPostingDate@23(); BEGIN IF GenJnlCheckLine.DateNotAllowed(PostingDate) THEN ERROR(DateNotAllowedErr,Caption,EntryNo); IF PostingDate \&gt; MaxPostingDate THEN MaxPostingDate := PostingDate; END; Bad code
|
||||
PROCEDURE CheckPostingDate@23(CaptionEntryNo@1005 : Text[50]); BEGIN IF GenJnlCheckLine.DateNotAllowed(PostingDate) THEN ERROR(DateNotAllowedErr,Caption,EntryNo) IF PostingDate &gt; MaxPostingDate THEN MaxPostingDate := PostingDate; END Good code
|
||||
PROCEDURE CheckPostingDate@23(); BEGIN IF GenJnlCheckLine.DateNotAllowed(PostingDate) THEN ERROR(DateNotAllowedErr,Caption,EntryNo); IF PostingDate &gt; MaxPostingDate THEN MaxPostingDate := PostingDate; END; Bad code
|
||||
PROCEDURE IsReturned@14(EntryNo@1002 : Integer) : Decimal; VAR ItemEntry@1000 : Record 32; Quantity@1003 : Integer; BEGIN EXIT(-OutboundApplied(EntryNo,TRUE) - InboundApplied(EntryNo,TRUE)); END; Good code</description></item><item><title>Variable Capacity Mismatch</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/variable-capacity-mismatch/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/variable-capacity-mismatch/</guid><description>Do not assign a value to a variable whose capacity is smaller.
|
||||
It will throw an error at runtime.
|
||||
Bad code
|
||||
FileName@1010 : Text\[250\]; ... UploadedFileName@1016 : Text\[1024\]; ... FileName := UploadedFileName; Good code
|
||||
FileName@1010 : Text\[1024\]; ... UploadedFileName@1016 : Text\[1024\]; ... FileName := UploadedFileName; Bad code
|
||||
FileName@1010 : Text\[250\]; ... UploadedFileName@1016 : Text\[1024\]; ... FileName := UploadedFileName; Good code
|
||||
FileName@1010 : Text\[250\]; ... UploadedFileName@1016 : Text\[1024\]; .</description></item><item><title>WITH Scope Name Collision</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/with-scope-name-collision/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/with-scope-name-collision/</guid><description>Do not use the WITH scope when it has a variable whose name is the same as a local variable. This can lead to wrong code assumptions.
|
||||
FileName@1010 : Text[250]; ... UploadedFileName@1016 : Text[1024]; ... FileName := UploadedFileName; Good code
|
||||
FileName@1010 : Text[1024]; ... UploadedFileName@1016 : Text[1024]; ... FileName := UploadedFileName; Bad code
|
||||
FileName@1010 : Text[250]; ... UploadedFileName@1016 : Text[1024]; ... FileName := UploadedFileName; Good code
|
||||
FileName@1010 : Text[250]; ... UploadedFileName@1016 : Text[1024]; .</description></item><item><title>WITH Scope Name Collision</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/with-scope-name-collision/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/design/with-scope-name-collision/</guid><description>Do not use the WITH scope when it has a variable whose name is the same as a local variable. This can lead to wrong code assumptions.
|
||||
Given that &ldquo;Contract Type&rdquo; is a field on table ServiceContractHeader, then in the following example there is a parameter name clash with the field name. Which one will be used?
|
||||
Bad code
|
||||
PROCEDURE InsertData@1(&quot;Contract Type&quot;@1000 : Option...); ... BEGIN ... WITH ServiceContractHeader DO BEGIN .</description></item></channel></rss>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Initialized Variables :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506469 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506469></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/design/initialized-variables/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506469></script>
|
||||
<script src=/js/auto-complete.js?1644506469></script>
|
||||
<script src=/js/search.js?1644506469></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -259,41 +259,41 @@ ALGuidelines.Dev
|
|||
<p>Bad code</p>
|
||||
<pre><code>PROCEDURE SetPurchLine@22(VAR CurrentPurchLine@1000 : Record 39);
|
||||
VAR
|
||||
Pegging@1001 : Boolean;
|
||||
Pegging@1001 : Boolean;
|
||||
BEGIN
|
||||
IF Pegging THEN
|
||||
CurrQuantity := CurrentPurchLine."Quantity (Base)"
|
||||
ELSE
|
||||
CurrQuantity := CurrentPurchLine."Outstanding Qty. (Base)";
|
||||
IF Pegging THEN
|
||||
CurrQuantity := CurrentPurchLine."Quantity (Base)"
|
||||
ELSE
|
||||
CurrQuantity := CurrentPurchLine."Outstanding Qty. (Base)";
|
||||
END;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>PROCEDURE SetPurchLine@22(VAR CurrentPurchLine@1000 : Record 39);
|
||||
VAR
|
||||
Pegging@1001 : Boolean;
|
||||
Pegging@1001 : Boolean;
|
||||
BEGIN
|
||||
Pegging := IsPegging(CurrentPurchLine);
|
||||
IF Pegging THEN
|
||||
CurrQuantity := CurrentPurchLine."Quantity (Base)"
|
||||
ELSE
|
||||
CurrQuantity := CurrentPurchLine."Outstanding Qty. (Base)";
|
||||
Pegging := IsPegging(CurrentPurchLine);
|
||||
IF Pegging THEN
|
||||
CurrQuantity := CurrentPurchLine."Quantity (Base)"
|
||||
ELSE
|
||||
CurrQuantity := CurrentPurchLine."Outstanding Qty. (Base)";
|
||||
END;
|
||||
</code></pre>
|
||||
<p>Bad code</p>
|
||||
<pre><code>// In the example below, the function will always return FALSE.
|
||||
PROCEDURE GetItemsToPlan@22() : Boolean;
|
||||
BEGIN
|
||||
SETRANGE("Document Type","Document Type"::Order);
|
||||
...
|
||||
FINDSET
|
||||
SETRANGE("Document Type","Document Type"::Order);
|
||||
...
|
||||
FINDSET
|
||||
END;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>PROCEDURE GetItemsToPlan@22() : Boolean;
|
||||
BEGIN
|
||||
SETRANGE("Document Type","Document Type"::Order);
|
||||
...
|
||||
EXIT(FINDSET)
|
||||
SETRANGE("Document Type","Document Type"::Order);
|
||||
...
|
||||
EXIT(FINDSET)
|
||||
END;
|
||||
</code></pre>
|
||||
<footer class=footline>
|
||||
|
|
@ -308,12 +308,12 @@ END;
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506469></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506469></script>
|
||||
<script src=/js/featherlight.min.js?1644506469></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506469></script>
|
||||
<script src=/js/relearn.js?1644506469></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Maintainability Index :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506469 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506469></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/design/maintainability-index/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506469></script>
|
||||
<script src=/js/auto-complete.js?1644506469></script>
|
||||
<script src=/js/search.js?1644506469></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -260,11 +260,11 @@ ALGuidelines.Dev
|
|||
<pre><code>Any procedure / trigger that has a maintainability index < 20
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>Any procedure / trigger that has a maintainability index \>= 20\.
|
||||
<pre><code>Any procedure / trigger that has a maintainability index >= 20\.
|
||||
The Maintainability Index is computed as a function:
|
||||
- Lines Of Code (inverse proportional)
|
||||
- the Halstead Volume
|
||||
- Cyclomatic Complexity (inverse proportional).
|
||||
- Lines Of Code (inverse proportional)
|
||||
- the Halstead Volume
|
||||
- Cyclomatic Complexity (inverse proportional).
|
||||
</code></pre>
|
||||
<p>More info</p>
|
||||
<ul>
|
||||
|
|
@ -272,7 +272,7 @@ The Maintainability Index is computed as a function:
|
|||
<li><a href=http://www.aivosto.com/project/help/pm-complexity.html>Cyclomatic Complexity</a></li>
|
||||
</ul>
|
||||
<p>Bad code</p>
|
||||
<pre><code>Any procedure / trigger that is \> 100 lines of code
|
||||
<pre><code>Any procedure / trigger that is > 100 lines of code
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>Any procedure / trigger that is <= 100 lines of code.
|
||||
|
|
@ -290,12 +290,12 @@ A full C/AL Statement counts as 1 line of code
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506469></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506469></script>
|
||||
<script src=/js/featherlight.min.js?1644506469></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506469></script>
|
||||
<script src=/js/relearn.js?1644506469></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Parameter Placeholders :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506469 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506469></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/design/parameter-placeholders/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506469></script>
|
||||
<script src=/js/auto-complete.js?1644506469></script>
|
||||
<script src=/js/search.js?1644506469></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -252,7 +252,6 @@ ALGuidelines.Dev
|
|||
<li>
|
||||
<ul>
|
||||
<li><a href=#heading></a></li>
|
||||
<li><a href=#heading-1></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
@ -265,7 +264,6 @@ ALGuidelines.Dev
|
|||
<main id=body-inner>
|
||||
<h1>Parameter Placeholders</h1>
|
||||
<p>The number of parameters passed to a string must match the placeholders.</p>
|
||||
<hr>
|
||||
<p>Bad code</p>
|
||||
<pre><code>CannotDeleteLineErr@1005 : TextConst 'ENU=You cannot delete this line because one or more rating values exists.';
|
||||
...
|
||||
|
|
@ -276,7 +274,6 @@ ERROR(CannotDeleteLineErr,TABLECAPTION);
|
|||
...
|
||||
ERROR(CannotDeleteLineErr);
|
||||
</code></pre>
|
||||
<h3 id=heading></h3>
|
||||
<p>Bad code</p>
|
||||
<pre><code>CannotUseThisFieldErr@1020 : TextConst 'ENU=You cannot use this field for %2 fields.';
|
||||
...
|
||||
|
|
@ -287,7 +284,7 @@ ERROR(CannotUseThisFieldErr,0,Field.Class);
|
|||
...
|
||||
ERROR(CannotUseThisFieldErr,Field.Class);
|
||||
</code></pre>
|
||||
<h3 id=heading-1></h3>
|
||||
<h3 id=heading></h3>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -300,12 +297,12 @@ ERROR(CannotUseThisFieldErr,Field.Class);
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506469></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506469></script>
|
||||
<script src=/js/featherlight.min.js?1644506469></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506469></script>
|
||||
<script src=/js/relearn.js?1644506469></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Static Object Invocation :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506469 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506469></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/design/static-object-invocation/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506469></script>
|
||||
<script src=/js/auto-complete.js?1644506469></script>
|
||||
<script src=/js/search.js?1644506469></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -259,15 +259,15 @@ ALGuidelines.Dev
|
|||
<p>Bad code</p>
|
||||
<pre><code>LOCAL PROCEDURE Code@1();
|
||||
VAR
|
||||
CAJnlPostBatch@1001 : Codeunit 1103;
|
||||
CAJnlPostBatch@1001 : Codeunit 1103;
|
||||
BEGIN
|
||||
CAJnlPostBatch.Run(CostJnlLine);
|
||||
CAJnlPostBatch.Run(CostJnlLine);
|
||||
END;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>LOCAL PROCEDURE Code@1();
|
||||
BEGIN
|
||||
CODEUNIT.RUN(CODEUNIT::"CA Jnl.-Post Batch",CostJnlLine);
|
||||
CODEUNIT.RUN(CODEUNIT::"CA Jnl.-Post Batch",CostJnlLine);
|
||||
END;
|
||||
</code></pre>
|
||||
<footer class=footline>
|
||||
|
|
@ -282,12 +282,12 @@ END;
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506469></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506469></script>
|
||||
<script src=/js/featherlight.min.js?1644506469></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506469></script>
|
||||
<script src=/js/relearn.js?1644506469></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Unreachable Code :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506469 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506469></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/design/unreachable-code/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506469></script>
|
||||
<script src=/js/auto-complete.js?1644506469></script>
|
||||
<script src=/js/search.js?1644506469></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -258,17 +258,17 @@ ALGuidelines.Dev
|
|||
<p>Do not write code that will never be hit.</p>
|
||||
<p>It affects code readability and can lead to wrong assumptions.</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>IF Type <\> Type::FIELD THEN BEGIN
|
||||
...
|
||||
ERROR(...);
|
||||
RecRef.CLOSE;
|
||||
<pre><code>IF Type <> Type::FIELD THEN BEGIN
|
||||
...
|
||||
ERROR(...);
|
||||
RecRef.CLOSE;
|
||||
END;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF Type <\> Type::FIELD THEN BEGIN
|
||||
...
|
||||
RecRef.CLOSE;
|
||||
ERROR(...);
|
||||
<pre><code>IF Type <> Type::FIELD THEN BEGIN
|
||||
...
|
||||
RecRef.CLOSE;
|
||||
ERROR(...);
|
||||
END;
|
||||
</code></pre>
|
||||
<footer class=footline>
|
||||
|
|
@ -283,12 +283,12 @@ END;
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506469></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506469></script>
|
||||
<script src=/js/featherlight.min.js?1644506469></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506469></script>
|
||||
<script src=/js/relearn.js?1644506469></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Unused Initialized Variables :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506469 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506469></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/design/unused-initialized-variables/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506469></script>
|
||||
<script src=/js/auto-complete.js?1644506469></script>
|
||||
<script src=/js/search.js?1644506469></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -257,34 +257,34 @@ ALGuidelines.Dev
|
|||
<h1>Unused Initialized Variables</h1>
|
||||
<p>The value assigned to a variable must be used. Else the variable is not necessary.</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>PROCEDURE AddEntities@1(FilterStr@1000 : Text\[250\]);
|
||||
<pre><code>PROCEDURE AddEntities@1(FilterStr@1000 : Text[250]);
|
||||
VAR
|
||||
Vendor@1001 : Record 23;
|
||||
Count@1002 : Integer;
|
||||
Vendor@1001 : Record 23;
|
||||
Count@1002 : Integer;
|
||||
BEGIN
|
||||
Count := 0;
|
||||
Vendor.SETFILTER("No.",FilterStr);
|
||||
IF Vendor.FINDSET THEN
|
||||
REPEAT
|
||||
"User ID" := USERID;
|
||||
"Vendor No." := Vendor."No.";
|
||||
IF INSERT THEN
|
||||
Count += 1;
|
||||
UNTIL Vendor.NEXT = 0;
|
||||
Count := 0;
|
||||
Vendor.SETFILTER("No.",FilterStr);
|
||||
IF Vendor.FINDSET THEN
|
||||
REPEAT
|
||||
"User ID" := USERID;
|
||||
"Vendor No." := Vendor."No.";
|
||||
IF INSERT THEN
|
||||
Count += 1;
|
||||
UNTIL Vendor.NEXT = 0;
|
||||
END;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>PROCEDURE AddEntities@1(FilterStr@1000 : Text\[250\]);
|
||||
<pre><code>PROCEDURE AddEntities@1(FilterStr@1000 : Text[250]);
|
||||
VAR
|
||||
Vendor@1001 : Record 23;
|
||||
Vendor@1001 : Record 23;
|
||||
BEGIN
|
||||
Vendor.SETFILTER("No.",FilterStr);
|
||||
IF Vendor.FINDSET THEN
|
||||
REPEAT
|
||||
"User ID" := USERID;
|
||||
"Vendor No." := Vendor."No.";
|
||||
IF INSERT THEN;
|
||||
UNTIL Vendor.NEXT = 0;
|
||||
Vendor.SETFILTER("No.",FilterStr);
|
||||
IF Vendor.FINDSET THEN
|
||||
REPEAT
|
||||
"User ID" := USERID;
|
||||
"Vendor No." := Vendor."No.";
|
||||
IF INSERT THEN;
|
||||
UNTIL Vendor.NEXT = 0;
|
||||
END;
|
||||
</code></pre>
|
||||
<footer class=footline>
|
||||
|
|
@ -299,12 +299,12 @@ END;
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506469></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506469></script>
|
||||
<script src=/js/featherlight.min.js?1644506469></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506469></script>
|
||||
<script src=/js/relearn.js?1644506469></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Unused Variables :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506469 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506469></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/design/unused-variables/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506469></script>
|
||||
<script src=/js/auto-complete.js?1644506469></script>
|
||||
<script src=/js/search.js?1644506469></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -258,36 +258,36 @@ ALGuidelines.Dev
|
|||
<p>Do not declare variables that are unused.</p>
|
||||
<p>Unused variables affect readability.</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>PROCEDURE CheckPostingDate@23(CaptionEntryNo@1005 : Text\[50\]);
|
||||
<pre><code>PROCEDURE CheckPostingDate@23(CaptionEntryNo@1005 : Text[50]);
|
||||
BEGIN
|
||||
IF GenJnlCheckLine.DateNotAllowed(PostingDate) THEN
|
||||
ERROR(DateNotAllowedErr,Caption,EntryNo)
|
||||
IF PostingDate \> MaxPostingDate THEN
|
||||
MaxPostingDate := PostingDate;
|
||||
IF GenJnlCheckLine.DateNotAllowed(PostingDate) THEN
|
||||
ERROR(DateNotAllowedErr,Caption,EntryNo)
|
||||
IF PostingDate > MaxPostingDate THEN
|
||||
MaxPostingDate := PostingDate;
|
||||
END
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>PROCEDURE CheckPostingDate@23();
|
||||
BEGIN
|
||||
IF GenJnlCheckLine.DateNotAllowed(PostingDate) THEN
|
||||
ERROR(DateNotAllowedErr,Caption,EntryNo);
|
||||
IF PostingDate \> MaxPostingDate THEN
|
||||
MaxPostingDate := PostingDate;
|
||||
IF GenJnlCheckLine.DateNotAllowed(PostingDate) THEN
|
||||
ERROR(DateNotAllowedErr,Caption,EntryNo);
|
||||
IF PostingDate > MaxPostingDate THEN
|
||||
MaxPostingDate := PostingDate;
|
||||
END;
|
||||
</code></pre>
|
||||
<p>Bad code</p>
|
||||
<pre><code>PROCEDURE IsReturned@14(EntryNo@1002 : Integer) : Decimal;
|
||||
VAR
|
||||
ItemEntry@1000 : Record 32;
|
||||
Quantity@1003 : Integer;
|
||||
ItemEntry@1000 : Record 32;
|
||||
Quantity@1003 : Integer;
|
||||
BEGIN
|
||||
EXIT(-OutboundApplied(EntryNo,TRUE) - InboundApplied(EntryNo,TRUE));
|
||||
EXIT(-OutboundApplied(EntryNo,TRUE) - InboundApplied(EntryNo,TRUE));
|
||||
END;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>PROCEDURE IsReturned@14(EntryNo@1002 : Integer) : Decimal;
|
||||
BEGIN
|
||||
EXIT(-OutboundApplied(EntryNo,TRUE) - InboundApplied(EntryNo,TRUE));
|
||||
EXIT(-OutboundApplied(EntryNo,TRUE) - InboundApplied(EntryNo,TRUE));
|
||||
END;
|
||||
</code></pre>
|
||||
<footer class=footline>
|
||||
|
|
@ -302,12 +302,12 @@ END;
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506469></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506469></script>
|
||||
<script src=/js/featherlight.min.js?1644506469></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506469></script>
|
||||
<script src=/js/relearn.js?1644506469></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Variable Capacity Mismatch :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506469 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506469></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/design/variable-capacity-mismatch/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506469></script>
|
||||
<script src=/js/auto-complete.js?1644506469></script>
|
||||
<script src=/js/search.js?1644506469></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -258,50 +258,50 @@ ALGuidelines.Dev
|
|||
<p>Do not assign a value to a variable whose capacity is smaller.</p>
|
||||
<p>It will throw an error at runtime.</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>FileName@1010 : Text\[250\];
|
||||
<pre><code>FileName@1010 : Text[250];
|
||||
...
|
||||
UploadedFileName@1016 : Text\[1024\];
|
||||
UploadedFileName@1016 : Text[1024];
|
||||
...
|
||||
FileName := UploadedFileName;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>FileName@1010 : Text\[1024\];
|
||||
<pre><code>FileName@1010 : Text[1024];
|
||||
...
|
||||
UploadedFileName@1016 : Text\[1024\];
|
||||
UploadedFileName@1016 : Text[1024];
|
||||
...
|
||||
FileName := UploadedFileName;
|
||||
</code></pre>
|
||||
<p>Bad code</p>
|
||||
<pre><code>FileName@1010 : Text\[250\];
|
||||
<pre><code>FileName@1010 : Text[250];
|
||||
...
|
||||
UploadedFileName@1016 : Text\[1024\];
|
||||
UploadedFileName@1016 : Text[1024];
|
||||
...
|
||||
FileName := UploadedFileName;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>FileName@1010 : Text\[250\];
|
||||
<pre><code>FileName@1010 : Text[250];
|
||||
...
|
||||
UploadedFileName@1016 : Text\[1024\];
|
||||
UploadedFileName@1016 : Text[1024];
|
||||
...
|
||||
FileName := COPYSTR(UploadedFileName,1,250); // In case only the first 250 chars are needed. Similar for fields
|
||||
</code></pre>
|
||||
<p>Bad code</p>
|
||||
<pre><code>VAR
|
||||
ExceededNumberTxt@001 : 'ENU=Warning: Exceeded number of unsent documents/requests'
|
||||
Subject@1002 : Text\[50\];
|
||||
...
|
||||
ExceededNumberTxt@001 : 'ENU=Warning: Exceeded number of unsent documents/requests'
|
||||
Subject@1002 : Text[50];
|
||||
...
|
||||
BEGIN
|
||||
...
|
||||
Subject := ExceededNumberTxt;
|
||||
...
|
||||
Subject := ExceededNumberTxt;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>VAR
|
||||
ExceededNumberTxt@001 : 'ENU=Warning: Exceeded number of unsent documents/requests'
|
||||
Subject@1002 : Text\[100\];
|
||||
...
|
||||
ExceededNumberTxt@001 : 'ENU=Warning: Exceeded number of unsent documents/requests'
|
||||
Subject@1002 : Text[100];
|
||||
...
|
||||
BEGIN
|
||||
...
|
||||
Subject := ExceededNumberTxt';
|
||||
...
|
||||
Subject := ExceededNumberTxt';
|
||||
</code></pre>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
|
|
@ -315,12 +315,12 @@ Subject := ExceededNumberTxt';
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506469></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506469></script>
|
||||
<script src=/js/featherlight.min.js?1644506469></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506469></script>
|
||||
<script src=/js/relearn.js?1644506469></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>WITH Scope Name Collision :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506469 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506469></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/design/with-scope-name-collision/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506469></script>
|
||||
<script src=/js/auto-complete.js?1644506469></script>
|
||||
<script src=/js/search.js?1644506469></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -256,25 +256,26 @@ ALGuidelines.Dev
|
|||
<main id=body-inner>
|
||||
<h1>WITH Scope Name Collision</h1>
|
||||
<p>Do not use the WITH scope when it has a variable whose name is the same as a local variable. This can lead to wrong code assumptions.</p>
|
||||
<p><strong>Given that</strong> “Contract Type” is a field on table ServiceContractHeader, then in the following example there is a parameter name clash with the field name. Which one will be used?</p>
|
||||
<p><strong>Given that</strong> <br>
|
||||
“Contract Type” is a field on table ServiceContractHeader, then in the following example there is a parameter name clash with the field name. Which one will be used?</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>PROCEDURE InsertData@1("Contract Type"@1000 : Option...);
|
||||
...
|
||||
BEGIN
|
||||
...
|
||||
WITH ServiceContractHeader DO BEGIN
|
||||
...
|
||||
DimMgt.InsertServContractDim(...,"Contract Type","Contract No.",0,...);
|
||||
...
|
||||
WITH ServiceContractHeader DO BEGIN
|
||||
...
|
||||
DimMgt.InsertServContractDim(...,"Contract Type","Contract No.",0,...);
|
||||
END;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>PROCEDURE InsertData@1(ContractType@1000 : Option...);
|
||||
...
|
||||
BEGIN
|
||||
...
|
||||
WITH ServiceContractHeader DO BEGIN
|
||||
...
|
||||
DimMgt.InsertServContractDim(...,ContractType,"Contract No.",0,...);
|
||||
...
|
||||
WITH ServiceContractHeader DO BEGIN
|
||||
...
|
||||
DimMgt.InsertServContractDim(...,ContractType,"Contract No.",0,...);
|
||||
END;
|
||||
</code></pre>
|
||||
<footer class=footline>
|
||||
|
|
@ -289,12 +290,12 @@ END;
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506469></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506469></script>
|
||||
<script src=/js/featherlight.min.js?1644506469></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506469></script>
|
||||
<script src=/js/relearn.js?1644506469></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -6,16 +6,16 @@
|
|||
<link rel=alternate type=application/rss+xml href=/navpatterns/3-cal-coding-guidelines/index.xml title="AL Guidelines">
|
||||
<meta name=description content>
|
||||
<title>3. CAL Coding Guidelines :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506471 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506471></script>
|
||||
<link href=/css/nucleus.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600601 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600601></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/>
|
||||
|
|
@ -33,9 +33,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506471></script>
|
||||
<script src=/js/auto-complete.js?1644506471></script>
|
||||
<script src=/js/search.js?1644506471></script>
|
||||
<script src=/js/lunr.min.js?1644600601></script>
|
||||
<script src=/js/auto-complete.js?1644600601></script>
|
||||
<script src=/js/search.js?1644600601></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -271,12 +271,12 @@ ALGuidelines.Dev
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506471></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506471></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506471></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506471></script>
|
||||
<script src=/js/featherlight.min.js?1644506471></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506471></script>
|
||||
<script src=/js/relearn.js?1644506471></script>
|
||||
<script src=/js/clipboard.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600601></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600601></script>
|
||||
<script src=/js/featherlight.min.js?1644600601></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600601></script>
|
||||
<script src=/js/relearn.js?1644600601></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Internally used DotNet Types :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506469 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506469></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/internally-used-dot-net-types/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506469></script>
|
||||
<script src=/js/auto-complete.js?1644506469></script>
|
||||
<script src=/js/search.js?1644506469></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -367,12 +367,12 @@ ALGuidelines.Dev
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506469></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506469></script>
|
||||
<script src=/js/featherlight.min.js?1644506469></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506469></script>
|
||||
<script src=/js/relearn.js?1644506469></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -6,16 +6,16 @@
|
|||
<link rel=alternate type=application/rss+xml href=/navpatterns/3-cal-coding-guidelines/internationalization/index.xml title="AL Guidelines">
|
||||
<meta name=description content>
|
||||
<title>Internationalization :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506471 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506471></script>
|
||||
<link href=/css/nucleus.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600601 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600601></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/internationalization/>
|
||||
|
|
@ -33,9 +33,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506471></script>
|
||||
<script src=/js/auto-complete.js?1644506471></script>
|
||||
<script src=/js/search.js?1644506471></script>
|
||||
<script src=/js/lunr.min.js?1644600601></script>
|
||||
<script src=/js/auto-complete.js?1644600601></script>
|
||||
<script src=/js/search.js?1644600601></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -275,12 +275,12 @@ ALGuidelines.Dev
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506471></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506471></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506471></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506471></script>
|
||||
<script src=/js/featherlight.min.js?1644506471></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506471></script>
|
||||
<script src=/js/relearn.js?1644506471></script>
|
||||
<script src=/js/clipboard.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600601></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600601></script>
|
||||
<script src=/js/featherlight.min.js?1644600601></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600601></script>
|
||||
<script src=/js/relearn.js?1644600601></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Internationalization on AL Guidelines</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/internationalization/</link><description>Recent content in Internationalization on AL Guidelines</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><atom:link href="https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/internationalization/index.xml" rel="self" type="application/rss+xml"/><item><title>Using Calcdate</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/internationalization/using-calcdate/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/internationalization/using-calcdate/</guid><description>CALCDATE should only be used with DateFormula variables. Alternatively the string should be enclosed using the &lt;&gt; symbols. Bad code
|
||||
IF ReservEntry.&quot;Expected Receipt Date&quot; \&gt; CALCDATE('-' + FORMAT(&quot;Dampener (Time)&quot;) + FirstDate) THEN Good code
|
||||
IF ReservEntry.&quot;Expected Receipt Date&quot; \&gt; CALCDATE('&lt;-' + FORMAT(&quot;Dampener (Time)&quot;) + FirstDate + '\&gt;') THEN</description></item></channel></rss>
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Internationalization on AL Guidelines</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/internationalization/</link><description>Recent content in Internationalization on AL Guidelines</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><atom:link href="https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/internationalization/index.xml" rel="self" type="application/rss+xml"/><item><title>Using Calcdate</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/internationalization/using-calcdate/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/internationalization/using-calcdate/</guid><description>CALCDATE should only be used with DateFormula variables. Alternatively the string should be enclosed using the &lt;&gt; symbols.
|
||||
Bad code
|
||||
IF ReservEntry.&quot;Expected Receipt Date&quot; &gt; CALCDATE('-' + FORMAT(&quot;Dampener (Time)&quot;) + FirstDate) THEN Good code
|
||||
IF ReservEntry.&quot;Expected Receipt Date&quot; &gt; CALCDATE('&lt;-' + FORMAT(&quot;Dampener (Time)&quot;) + FirstDate + '&gt;') THEN</description></item></channel></rss>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Using Calcdate :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506469 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506469></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/internationalization/using-calcdate/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506469></script>
|
||||
<script src=/js/auto-complete.js?1644506469></script>
|
||||
<script src=/js/search.js?1644506469></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,15 +255,15 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Using Calcdate</h1>
|
||||
<p>CALCDATE should only be used with DateFormula variables. Alternatively the string should be enclosed using the <> symbols.
|
||||
Bad code</p>
|
||||
<pre><code>IF ReservEntry."Expected Receipt Date" \>
|
||||
CALCDATE('-' + FORMAT("Dampener (Time)") + FirstDate)
|
||||
<p>CALCDATE should only be used with DateFormula variables. Alternatively the string should be enclosed using the <> symbols.</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>IF ReservEntry."Expected Receipt Date" >
|
||||
CALCDATE('-' + FORMAT("Dampener (Time)") + FirstDate)
|
||||
THEN
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF ReservEntry."Expected Receipt Date" \>
|
||||
CALCDATE('<-' + FORMAT("Dampener (Time)") + FirstDate + '\>')
|
||||
<pre><code>IF ReservEntry."Expected Receipt Date" >
|
||||
CALCDATE('<-' + FORMAT("Dampener (Time)") + FirstDate + '>')
|
||||
THEN
|
||||
</code></pre>
|
||||
<footer class=footline>
|
||||
|
|
@ -278,12 +278,12 @@ THEN
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506469></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506469></script>
|
||||
<script src=/js/featherlight.min.js?1644506469></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506469></script>
|
||||
<script src=/js/relearn.js?1644506469></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>CaptionML on System Pages :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506469 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506469></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/localizability/captionml-for-system-tables/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506469></script>
|
||||
<script src=/js/auto-complete.js?1644506469></script>
|
||||
<script src=/js/search.js?1644506469></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -287,12 +287,12 @@ OBJECT Table 2000000000 User
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506469></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506469></script>
|
||||
<script src=/js/featherlight.min.js?1644506469></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506469></script>
|
||||
<script src=/js/relearn.js?1644506469></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>FIELDCAPTION and TABLECAPTION :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506469 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506469></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/localizability/fieldcaption-and-tablecaption/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506469></script>
|
||||
<script src=/js/auto-complete.js?1644506469></script>
|
||||
<script src=/js/search.js?1644506469></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -262,11 +262,10 @@ ALGuidelines.Dev
|
|||
<li>If the caption/name changes, then there will be a single point of change needed.</li>
|
||||
</ol>
|
||||
<p>Bad code</p>
|
||||
<pre><code>IF NOT CONFIRM(UpdateLocationQst,TRUE,FIELDNAME("Location Code"),...)
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF NOT CONFIRM(UpdateLocationQst,TRUE,FIELDCAPTION("Location Code"),...)
|
||||
</code></pre>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> <span style=color:#f92672>NOT</span> CONFIRM<span style=color:#f92672>(</span>UpdateLocationQst,TRUE,FIELDNAME<span style=color:#f92672>(</span>"Location Code"<span style=color:#f92672>)</span>,<span style=color:#f92672>...)
|
||||
</span></code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> <span style=color:#f92672>NOT</span> CONFIRM<span style=color:#f92672>(</span>UpdateLocationQst,TRUE,FIELDCAPTION<span style=color:#f92672>(</span>"Location Code"<span style=color:#f92672>)</span>,<span style=color:#f92672>...)
|
||||
</span></code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -279,12 +278,12 @@ ALGuidelines.Dev
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506469></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506469></script>
|
||||
<script src=/js/featherlight.min.js?1644506469></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506469></script>
|
||||
<script src=/js/relearn.js?1644506469></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Global Text Constants :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506469 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506469></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/localizability/global-text-constants/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506469></script>
|
||||
<script src=/js/auto-complete.js?1644506469></script>
|
||||
<script src=/js/search.js?1644506469></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -257,18 +257,17 @@ ALGuidelines.Dev
|
|||
<h1>Global Text Constants</h1>
|
||||
<p>Declare Text Constant as global variables.</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>PROCEDURE GetRequirementText@6(...) : Text\[50\];
|
||||
VAR
|
||||
RequirementOptionsTxt@1002 : TextConst 'ENU=Shipment,Receive,Pick,Put-Away';
|
||||
BEGIN
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>VAR
|
||||
RequirementOptionsTxt@1002 : TextConst 'ENU=Shipment,Receive,Pick,Put-Away';
|
||||
...
|
||||
PROCEDURE GetRequirementText@6(...) : Text\[50\];
|
||||
BEGIN
|
||||
</code></pre>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>PROCEDURE</span> GetRequirementText@<span style=color:#ae81ff>6</span><span style=color:#f92672>(...) </span>: <span style=color:#66d9ef>Text</span>[<span style=color:#ae81ff>50</span>];
|
||||
<span style=color:#66d9ef>VAR</span>
|
||||
RequirementOptionsTxt@<span style=color:#ae81ff>1002</span> : <span style=color:#66d9ef>TextConst</span> <span style=color:#e6db74>'ENU=Shipment,Receive,Pick,Put-Away'</span>;
|
||||
<span style=color:#66d9ef>BEGIN</span>
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>VAR</span>
|
||||
RequirementOptionsTxt@<span style=color:#ae81ff>1002</span> : <span style=color:#66d9ef>TextConst</span> <span style=color:#e6db74>'ENU=Shipment,Receive,Pick,Put-Away'</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span><span style=color:#66d9ef>PROCEDURE</span> GetRequirementText@<span style=color:#ae81ff>6</span><span style=color:#f92672>(...) </span>: <span style=color:#66d9ef>Text</span>[<span style=color:#ae81ff>50</span>];
|
||||
<span style=color:#66d9ef>BEGIN</span>
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -281,12 +280,12 @@ BEGIN
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506469></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506469></script>
|
||||
<script src=/js/featherlight.min.js?1644506469></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506469></script>
|
||||
<script src=/js/relearn.js?1644506469></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -6,16 +6,16 @@
|
|||
<link rel=alternate type=application/rss+xml href=/navpatterns/3-cal-coding-guidelines/localizability/index.xml title="AL Guidelines">
|
||||
<meta name=description content>
|
||||
<title>Localizability :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506471 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506471></script>
|
||||
<link href=/css/nucleus.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600601 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600601></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/localizability/>
|
||||
|
|
@ -33,9 +33,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506471></script>
|
||||
<script src=/js/auto-complete.js?1644506471></script>
|
||||
<script src=/js/search.js?1644506471></script>
|
||||
<script src=/js/lunr.min.js?1644600601></script>
|
||||
<script src=/js/auto-complete.js?1644600601></script>
|
||||
<script src=/js/search.js?1644600601></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -275,12 +275,12 @@ ALGuidelines.Dev
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506471></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506471></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506471></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506471></script>
|
||||
<script src=/js/featherlight.min.js?1644506471></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506471></script>
|
||||
<script src=/js/relearn.js?1644506471></script>
|
||||
<script src=/js/clipboard.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600601></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600601></script>
|
||||
<script src=/js/featherlight.min.js?1644600601></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600601></script>
|
||||
<script src=/js/relearn.js?1644600601></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -4,15 +4,16 @@ Bad code
|
|||
... { 2 ;2 ;Field ; CaptionML=ENU=Name; SourceExpr=Name } .</description></item><item><title>FIELDCAPTION and TABLECAPTION</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/localizability/fieldcaption-and-tablecaption/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/localizability/fieldcaption-and-tablecaption/</guid><description>For user messages, errors etc., use FIELDCAPTION not FIELDNAME and TABLECAPTION not TABLENAME.
|
||||
Reason:
|
||||
The correct translation will be automatically used. If the caption/name changes, then there will be a single point of change needed. Bad code
|
||||
IF NOT CONFIRM(UpdateLocationQst,TRUE,FIELDNAME(&quot;Location Code&quot;),...) Good code
|
||||
IF NOT CONFIRM(UpdateLocationQst,TRUE,FIELDCAPTION(&quot;Location Code&quot;),...)</description></item><item><title>Global Text Constants</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/localizability/global-text-constants/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/localizability/global-text-constants/</guid><description>Declare Text Constant as global variables.
|
||||
IF NOT CONFIRM(UpdateLocationQst,TRUE,FIELDNAME(&#34;Location Code&#34;),...) Good code
|
||||
IF NOT CONFIRM(UpdateLocationQst,TRUE,FIELDCAPTION(&#34;Location Code&#34;),...)</description></item><item><title>Global Text Constants</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/localizability/global-text-constants/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/localizability/global-text-constants/</guid><description>Declare Text Constant as global variables.
|
||||
Bad code
|
||||
PROCEDURE GetRequirementText@6(...) : Text\[50\]; VAR RequirementOptionsTxt@1002 : TextConst 'ENU=Shipment,Receive,Pick,Put-Away'; BEGIN Good code
|
||||
VAR RequirementOptionsTxt@1002 : TextConst 'ENU=Shipment,Receive,Pick,Put-Away'; ... PROCEDURE GetRequirementText@6(...) : Text\[50\]; BEGIN</description></item><item><title>Use Text Constants</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/localizability/use-text-constants/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/localizability/use-text-constants/</guid><description>Pass user messages using Text Constants. It makes translation easy.
|
||||
PROCEDURE GetRequirementText@6(...) : Text[50]; VAR RequirementOptionsTxt@1002 : TextConst &#39;ENU=Shipment,Receive,Pick,Put-Away&#39;; BEGIN Good code
|
||||
VAR RequirementOptionsTxt@1002 : TextConst &#39;ENU=Shipment,Receive,Pick,Put-Away&#39;; ... PROCEDURE GetRequirementText@6(...) : Text[50]; BEGIN</description></item><item><title>Use Text Constants</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/localizability/use-text-constants/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/localizability/use-text-constants/</guid><description>Pass user messages using Text Constants. It makes translation easy.
|
||||
Bad code
|
||||
ImportAttachmentQst@1021 : TextConst 'ENU=&quot;Import attachment &quot;'; ... IF CONFIRM(ImportAttachmentQst + Caption +'?',TRUE) THEN BEGIN Good code
|
||||
ImportAttachmentQst@1021 : TextConst 'ENU=&quot;Import attachment %1?&quot;'; ... IF CONFIRM(STRSUBSTNO(ImportAttachmentQst, Caption),TRUE) THEN BEGIN Bad code
|
||||
... IF NOT CONFIRM( STRSUBSTNO( 'Difference on Periodic entries: %1 on %2' + 'Do you want to continue?',Balance,Date), TRUE) THEN ERROR('Program terminated by the user'); Good code</description></item><item><title>Using OptionCaptionML</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/localizability/using-optioncaptionml/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/localizability/using-optioncaptionml/</guid><description>The OptionCaptionML should be filled in for sourceexpression using option data types.
|
||||
ImportAttachmentQst@1021 : TextConst &#39;ENU=&#34;Import attachment &#34;&#39;; ... IF CONFIRM(ImportAttachmentQst + Caption +&#39;?&#39;,TRUE) THEN BEGIN Good code
|
||||
ImportAttachmentQst@1021 : TextConst &#39;ENU=&#34;Import attachment %1?&#34;&#39;; ... IF CONFIRM(STRSUBSTNO(ImportAttachmentQst, Caption),TRUE) THEN BEGIN Bad code
|
||||
... IF NOT CONFIRM( STRSUBSTNO( &#39;Difference on Periodic entries: %1 on %2&#39; + &#39;Do you want to continue?&#39;,Balance,Date), TRUE) THEN ERROR(&#39;Program terminated by the user&#39;); Good code
|
||||
DiffOnPeriodEntiesQst@100 : TextConst &#39;ENU=&#34;Difference on Periodic entries: %1 on %2\\ Do you want to continue?</description></item><item><title>Using OptionCaptionML</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/localizability/using-optioncaptionml/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/localizability/using-optioncaptionml/</guid><description>The OptionCaptionML should be filled in for sourceexpression using option data types.
|
||||
Bad code
|
||||
{ 30 ;TextBox ;17850;0 ;150 ;423 ;Name=Selection; SourceExpr=Selection; DataSetFieldName=Selection } ... Selection@1008 : 'Open,Closed,Open and Closed'; ... Good code
|
||||
{ 30 ;TextBox ;17850;0 ;150 ;423 ;Name=Selection; OptionCaptionML=ENU=Open,Closed,Open and Closed; SourceExpr=Selection; DataSetFieldName=Selection } ... Selection@1008 : 'Open,Closed,Open and Closed';</description></item></channel></rss>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Use Text Constants :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506469 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506469></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/localizability/use-text-constants/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506469></script>
|
||||
<script src=/js/auto-complete.js?1644506469></script>
|
||||
<script src=/js/search.js?1644506469></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -257,33 +257,30 @@ ALGuidelines.Dev
|
|||
<h1>Use Text Constants</h1>
|
||||
<p>Pass user messages using Text Constants. It makes translation easy.</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>ImportAttachmentQst@1021 : TextConst 'ENU="Import attachment "';
|
||||
...
|
||||
IF CONFIRM(ImportAttachmentQst + Caption +'?',TRUE) THEN BEGIN
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>ImportAttachmentQst@1021 : TextConst 'ENU="Import attachment %1?"';
|
||||
...
|
||||
IF CONFIRM(STRSUBSTNO(ImportAttachmentQst, Caption),TRUE) THEN BEGIN
|
||||
</code></pre>
|
||||
<p>Bad code</p>
|
||||
<pre><code>...
|
||||
IF NOT
|
||||
CONFIRM(
|
||||
STRSUBSTNO(
|
||||
'Difference on Periodic entries: %1 on %2' +
|
||||
'Do you want to continue?',Balance,Date),
|
||||
TRUE)
|
||||
THEN
|
||||
ERROR('Program terminated by the user');
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>DiffOnPeriodEntiesQst@100 : TextConst 'ENU="Difference on Periodic entries: %1 on %2\\ Do you want to continue?"';
|
||||
ProgramTerminatedErr@200 : TextConst 'ENU="Program terminated by the user"';
|
||||
...
|
||||
IF NOT CONFIRM(STRSUBSTNO(DiffOnPeriodEntiesQst,Balance,Date),TRUE) THEN
|
||||
ERROR(ProgramTerminatedErr);
|
||||
</code></pre>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>ImportAttachmentQst@<span style=color:#ae81ff>1021</span> : <span style=color:#66d9ef>TextConst</span> <span style=color:#e6db74>'ENU="Import attachment "'</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span><span style=color:#66d9ef>IF</span> CONFIRM<span style=color:#f92672>(</span>ImportAttachmentQst + Caption +<span style=color:#e6db74>'?'</span>,TRUE<span style=color:#f92672>) </span><span style=color:#66d9ef>THEN</span> <span style=color:#66d9ef>BEGIN</span>
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>ImportAttachmentQst@<span style=color:#ae81ff>1021</span> : <span style=color:#66d9ef>TextConst</span> <span style=color:#e6db74>'ENU="Import attachment %1?"'</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span><span style=color:#66d9ef>IF</span> CONFIRM<span style=color:#f92672>(</span>STRSUBSTNO<span style=color:#f92672>(</span>ImportAttachmentQst, Caption<span style=color:#f92672>)</span>,TRUE<span style=color:#f92672>) </span><span style=color:#66d9ef>THEN</span> <span style=color:#66d9ef>BEGIN</span>
|
||||
</code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#f92672>...
|
||||
</span><span style=color:#f92672> </span><span style=color:#66d9ef>IF</span> <span style=color:#f92672>NOT</span>
|
||||
CONFIRM<span style=color:#f92672>(
|
||||
</span><span style=color:#f92672> </span>STRSUBSTNO<span style=color:#f92672>(
|
||||
</span><span style=color:#f92672> </span><span style=color:#e6db74>'Difference on Periodic entries: %1 on %2'</span> +
|
||||
<span style=color:#e6db74>'Do you want to continue?'</span>,Balance,<span style=color:#66d9ef>Date</span><span style=color:#f92672>)</span>,
|
||||
TRUE<span style=color:#f92672>)
|
||||
</span><span style=color:#f92672> </span><span style=color:#66d9ef>THEN</span>
|
||||
ERROR<span style=color:#f92672>(</span><span style=color:#e6db74>'Program terminated by the user'</span><span style=color:#f92672>)</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>DiffOnPeriodEntiesQst@<span style=color:#ae81ff>100</span> : <span style=color:#66d9ef>TextConst</span> <span style=color:#e6db74>'ENU="Difference on Periodic entries: %1 on %2\\ Do you want to continue?"'</span>;
|
||||
ProgramTerminatedErr@<span style=color:#ae81ff>200</span> : <span style=color:#66d9ef>TextConst</span> <span style=color:#e6db74>'ENU="Program terminated by the user"'</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672> </span><span style=color:#66d9ef>IF</span> <span style=color:#f92672>NOT</span> CONFIRM<span style=color:#f92672>(</span>STRSUBSTNO<span style=color:#f92672>(</span>DiffOnPeriodEntiesQst,Balance,<span style=color:#66d9ef>Date</span><span style=color:#f92672>)</span>,TRUE<span style=color:#f92672>) </span><span style=color:#66d9ef>THEN</span>
|
||||
ERROR<span style=color:#f92672>(</span>ProgramTerminatedErr<span style=color:#f92672>)</span>;
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -296,12 +293,12 @@ ERROR(ProgramTerminatedErr);
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506469></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506469></script>
|
||||
<script src=/js/featherlight.min.js?1644506469></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506469></script>
|
||||
<script src=/js/relearn.js?1644506469></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Using OptionCaptionML :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506469 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506469></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/localizability/using-optioncaptionml/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506469></script>
|
||||
<script src=/js/auto-complete.js?1644506469></script>
|
||||
<script src=/js/search.js?1644506469></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -284,12 +284,12 @@ Selection@1008 : 'Open,Closed,Open and Closed';
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506469></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506469></script>
|
||||
<script src=/js/featherlight.min.js?1644506469></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506469></script>
|
||||
<script src=/js/relearn.js?1644506469></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Begin as an 'After Word' :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506469 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506469></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/begin-as-an-afterword/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506469></script>
|
||||
<script src=/js/auto-complete.js?1644506469></script>
|
||||
<script src=/js/search.js?1644506469></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,15 +255,15 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Begin as an 'After Word'</h1>
|
||||
<p>When BEGIN follows THEN, ELSE, DO, it should be on the same line, preceded by one space character. Bad code</p>
|
||||
<pre><code>IF ICPartnerRefType = ICPartnerRefType::"Common Item No." THEN
|
||||
BEGIN
|
||||
...
|
||||
END;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF ICPartnerRefType = ICPartnerRefType::"Common Item No." THEN BEGIN
|
||||
...
|
||||
<p>When BEGIN follows THEN, ELSE, DO, it should be on the same line, preceded by one space character.</p>
|
||||
<p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> ICPartnerRefType = ICPartnerRefType::"Common Item No." <span style=color:#66d9ef>THEN</span>
|
||||
<span style=color:#66d9ef>BEGIN</span>
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span><span style=color:#66d9ef>END</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<pre tabindex=0><code>IF ICPartnerRefType = ICPartnerRefType::"Common Item No." THEN BEGIN
|
||||
...
|
||||
END;
|
||||
</code></pre>
|
||||
<footer class=footline>
|
||||
|
|
@ -278,12 +278,12 @@ END;
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Begin-End - Compound Only :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/begin-end/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,50 +255,44 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Begin-End - Compound Only</h1>
|
||||
<p>Only use BEGIN..END to enclose compound statements.
|
||||
Bad code</p>
|
||||
<pre><code>IF FINDSET THEN BEGIN
|
||||
REPEAT
|
||||
...
|
||||
UNTIL NEXT = 0;
|
||||
END;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF FINDSET THEN
|
||||
REPEAT
|
||||
...
|
||||
UNTIL NEXT = 0;
|
||||
</code></pre>
|
||||
<p>Only use BEGIN..END to enclose compound statements.</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>IF IsAssemblyOutputLine THEN BEGIN
|
||||
TESTFIELD("Order Line No.",0);
|
||||
END;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF IsAssemblyOutputLine THEN
|
||||
TESTFIELD("Order Line No.",0);
|
||||
</code></pre>
|
||||
<p>Bad code</p>
|
||||
<pre><code>IF FINDSET THEN
|
||||
REPEAT
|
||||
BEGIN
|
||||
...
|
||||
END;
|
||||
UNTIL NEXT = 0;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF FINDSET THEN
|
||||
REPEAT
|
||||
...
|
||||
UNTIL NEXT = 0;
|
||||
</code></pre>
|
||||
<p>Exception</p>
|
||||
<pre><code>// Except for this case
|
||||
IF X THEN BEGIN
|
||||
IF Y THEN
|
||||
DO SOMETHING;
|
||||
END ELSE (not X)
|
||||
</code></pre>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> FINDSET <span style=color:#66d9ef>THEN</span> <span style=color:#66d9ef>BEGIN</span>
|
||||
<span style=color:#66d9ef>REPEAT</span>
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672> </span><span style=color:#66d9ef>UNTIL</span> NEXT = <span style=color:#ae81ff>0</span>;
|
||||
<span style=color:#66d9ef>END</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> FINDSET <span style=color:#66d9ef>THEN</span>
|
||||
<span style=color:#66d9ef>REPEAT</span>
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672> </span><span style=color:#66d9ef>UNTIL</span> NEXT = <span style=color:#ae81ff>0</span>;
|
||||
</code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> IsAssemblyOutputLine <span style=color:#66d9ef>THEN</span> <span style=color:#66d9ef>BEGIN</span>
|
||||
<span style=color:#66d9ef>TESTFIELD</span><span style=color:#f92672>(</span>"Order Line No.",<span style=color:#ae81ff>0</span><span style=color:#f92672>)</span>;
|
||||
<span style=color:#66d9ef>END</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> IsAssemblyOutputLine <span style=color:#66d9ef>THEN</span>
|
||||
<span style=color:#66d9ef>TESTFIELD</span><span style=color:#f92672>(</span>"Order Line No.",<span style=color:#ae81ff>0</span><span style=color:#f92672>)</span>;
|
||||
</code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> FINDSET <span style=color:#66d9ef>THEN</span>
|
||||
<span style=color:#66d9ef>REPEAT</span>
|
||||
<span style=color:#66d9ef>BEGIN</span>
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672> </span><span style=color:#66d9ef>END</span>;
|
||||
<span style=color:#66d9ef>UNTIL</span> NEXT = <span style=color:#ae81ff>0</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> FINDSET <span style=color:#66d9ef>THEN</span>
|
||||
<span style=color:#66d9ef>REPEAT</span>
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672> </span><span style=color:#66d9ef>UNTIL</span> NEXT = <span style=color:#ae81ff>0</span>;
|
||||
</code></pre></div><p>Exception</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#75715e>// Except for this case
|
||||
</span><span style=color:#75715e></span><span style=color:#66d9ef>IF</span> X <span style=color:#66d9ef>THEN</span> <span style=color:#66d9ef>BEGIN</span>
|
||||
<span style=color:#66d9ef>IF</span> Y <span style=color:#66d9ef>THEN</span>
|
||||
<span style=color:#66d9ef>DO</span> SOMETHING;
|
||||
<span style=color:#66d9ef>END</span> <span style=color:#66d9ef>ELSE</span> <span style=color:#f92672>(</span><span style=color:#f92672>not</span> X<span style=color:#f92672>)
|
||||
</span></code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -311,12 +305,12 @@ END ELSE (not X)
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Binary Operator to Start Line :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/binary-operator-line-start/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,16 +255,16 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Binary Operator to Start Line</h1>
|
||||
<p>Do not start a line with a binary operator. Bad code</p>
|
||||
<pre><code>"Quantity to Ship" :=
|
||||
Quantity
|
||||
- "Quantity Shipped"
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>"Quantity to Ship" :=
|
||||
Quantity -
|
||||
"Quantity Shipped"
|
||||
</code></pre>
|
||||
<p>Do not start a line with a binary operator.</p>
|
||||
<p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>"Quantity to Ship" <span style=color:#f92672>:=</span>
|
||||
Quantity
|
||||
- "Quantity Shipped"
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>"Quantity to Ship" <span style=color:#f92672>:=</span>
|
||||
Quantity -
|
||||
"Quantity Shipped"
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -277,12 +277,12 @@ Quantity -
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Blank Lines :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/blank-lines/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,30 +255,31 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Blank Lines</h1>
|
||||
<p>Do not use blank lines at the beginning or end of any functions, after BEGIN, before END, or inside multiline expressions. Bad code</p>
|
||||
<pre><code>PROCEDURE MATRIX\_OnDrillDown@1133(MATRIX\_ColumnOrdinal : Integer);
|
||||
BEGIN
|
||||
SetupDrillDownCol(MATRIX\_ColumnOrdinal);
|
||||
DrillDown(FALSE,ValueType);
|
||||
END;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>PROCEDURE MATRIX\_OnDrillDown@1133(MATRIX\_ColumnOrdinal : Integer);
|
||||
BEGIN
|
||||
SetupDrillDownCol(MATRIX\_ColumnOrdinal);
|
||||
DrillDown(FALSE,ValueType);
|
||||
END;
|
||||
</code></pre>
|
||||
<p>Do not use blank lines at the beginning or end of any functions, after BEGIN, before END, or inside multiline expressions.</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>IF NameIsValid AND
|
||||
Name2IsValid
|
||||
THEN
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF NameIsValid AND
|
||||
Name2IsValid
|
||||
THEN
|
||||
</code></pre>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>PROCEDURE</span> MATRIX_OnDrillDown@<span style=color:#ae81ff>1133</span><span style=color:#f92672>(</span>MATRIX_ColumnOrdinal : <span style=color:#66d9ef>Integer</span><span style=color:#f92672>)</span>;
|
||||
<span style=color:#66d9ef>BEGIN</span>
|
||||
|
||||
SetupDrillDownCol<span style=color:#f92672>(</span>MATRIX_ColumnOrdinal<span style=color:#f92672>)</span>;
|
||||
DrillDown<span style=color:#f92672>(</span>FALSE,ValueType<span style=color:#f92672>)</span>;
|
||||
|
||||
<span style=color:#66d9ef>END</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>PROCEDURE</span> MATRIX_OnDrillDown@<span style=color:#ae81ff>1133</span><span style=color:#f92672>(</span>MATRIX_ColumnOrdinal : <span style=color:#66d9ef>Integer</span><span style=color:#f92672>)</span>;
|
||||
<span style=color:#66d9ef>BEGIN</span>
|
||||
SetupDrillDownCol<span style=color:#f92672>(</span>MATRIX_ColumnOrdinal<span style=color:#f92672>)</span>;
|
||||
DrillDown<span style=color:#f92672>(</span>FALSE,ValueType<span style=color:#f92672>)</span>;
|
||||
<span style=color:#66d9ef>END</span>;
|
||||
</code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> NameIsValid <span style=color:#f92672>AND</span>
|
||||
|
||||
Name2IsValid
|
||||
<span style=color:#66d9ef>THEN</span>
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> NameIsValid <span style=color:#f92672>AND</span>
|
||||
Name2IsValid
|
||||
<span style=color:#66d9ef>THEN</span>
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -291,12 +292,12 @@ THEN
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>CASE Action :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/case-actions/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,18 +255,18 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>CASE Action</h1>
|
||||
<p>A CASE action should start on a line after the possibility. Bad code</p>
|
||||
<pre><code>CASE Letter OF
|
||||
'A': Letter2 := '10';
|
||||
'B': Letter2 := '11';
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>CASE Letter OF
|
||||
'A':
|
||||
Letter2 := '10';
|
||||
'B':
|
||||
Letter2 := '11';
|
||||
</code></pre>
|
||||
<p>A CASE action should start on a line after the possibility.</p>
|
||||
<p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>CASE</span> Letter <span style=color:#66d9ef>OF</span>
|
||||
<span style=color:#e6db74>'A'</span>: Letter2 <span style=color:#f92672>:=</span> <span style=color:#e6db74>'10'</span>;
|
||||
<span style=color:#e6db74>'B'</span>: Letter2 <span style=color:#f92672>:=</span> <span style=color:#e6db74>'11'</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>CASE</span> Letter <span style=color:#66d9ef>OF</span>
|
||||
<span style=color:#e6db74>'A'</span>:
|
||||
Letter2 <span style=color:#f92672>:=</span> <span style=color:#e6db74>'10'</span>;
|
||||
<span style=color:#e6db74>'B'</span>:
|
||||
Letter2 <span style=color:#f92672>:=</span> <span style=color:#e6db74>'11'</span>;
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -279,12 +279,12 @@ Letter2 := '11';
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Colon usage in CASE :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/colon-usage-in-case/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,16 +255,16 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Colon usage in CASE</h1>
|
||||
<p>The last possibility on a CASE statement must be immediately followed by a colon. Bad code</p>
|
||||
<pre><code>CASE DimOption OF
|
||||
DimOption::"Global Dimension 1" :
|
||||
DimValue."Dimension Code" := GLSetup."Global Dimension 1 Code";
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>CASE DimOption OF
|
||||
DimOption::"Global Dimension 1":
|
||||
DimValue."Dimension Code" := GLSetup."Global Dimension 1 Code";
|
||||
</code></pre>
|
||||
<p>The last possibility on a CASE statement must be immediately followed by a colon.</p>
|
||||
<p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>CASE</span> DimOption <span style=color:#66d9ef>OF</span>
|
||||
DimOption::"Global Dimension 1" :
|
||||
DimValue<span style=color:#f92672>.</span>"Dimension Code" <span style=color:#f92672>:=</span> GLSetup<span style=color:#f92672>.</span>"Global Dimension 1 Code";
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>CASE</span> DimOption <span style=color:#66d9ef>OF</span>
|
||||
DimOption::"Global Dimension 1":
|
||||
DimValue<span style=color:#f92672>.</span>"Dimension Code" <span style=color:#f92672>:=</span> GLSetup<span style=color:#f92672>.</span>"Global Dimension 1 Code";
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -277,12 +277,12 @@ DimValue."Dimension Code" := GLSetup."Global Dimension 1 Code&quo
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Comments inside Curly Brackets :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/comments-curly-brackets/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,34 +255,32 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Comments inside Curly Brackets</h1>
|
||||
<p>Never use curly bracket comments. During development, the “Block comment” functionality can be used instead. However, in production code, block comments are not recommended. Bad code</p>
|
||||
<pre><code>PeriodTxt: {Period}
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>PeriodTxt: // Period
|
||||
</code></pre>
|
||||
<p>Never use curly bracket comments. During development, the “Block comment” functionality can be used instead. However, in production code, block comments are not recommended.</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>PROCEDURE MATRIX\_OnAfterGetRecord@10(MATRIX\_ColumnOrdinal : Integer);
|
||||
BEGIN
|
||||
{
|
||||
IF ShowColumnName THEN
|
||||
MatrixHeader := MatrixRecords\[MATRIX\_ColumnOrdinal\].Name
|
||||
ELSE
|
||||
MatrixHeader := MatrixRecords\[MATRIX\_ColumnOrdinal\].Code;
|
||||
}
|
||||
MatrixRecord := MatrixRecords\[MATRIX\_ColumnOrdinal\];
|
||||
AnalysisValue := CalcAmt(ValueType,TRUE);
|
||||
MATRIX\_CellData\[MATRIX\_ColumnOrdinal\] := AnalysisValue;
|
||||
END;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>PROCEDURE MATRIX\_OnAfterGetRecord@10(MATRIX\_ColumnOrdinal : Integer);
|
||||
BEGIN
|
||||
MatrixRecord := MatrixRecords\[MATRIX\_ColumnOrdinal\];
|
||||
AnalysisValue := CalcAmt(ValueType,TRUE);
|
||||
MATRIX\_CellData\[MATRIX\_ColumnOrdinal\] := AnalysisValue;
|
||||
END;
|
||||
</code></pre>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>PeriodTxt: {Period}
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>PeriodTxt: <span style=color:#75715e>// Period
|
||||
</span></code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>PROCEDURE</span> MATRIX_OnAfterGetRecord@<span style=color:#ae81ff>10</span><span style=color:#f92672>(</span>MATRIX_ColumnOrdinal : <span style=color:#66d9ef>Integer</span><span style=color:#f92672>)</span>;
|
||||
<span style=color:#66d9ef>BEGIN</span>
|
||||
{
|
||||
<span style=color:#66d9ef>IF</span> ShowColumnName <span style=color:#66d9ef>THEN</span>
|
||||
MatrixHeader <span style=color:#f92672>:=</span> MatrixRecords[MATRIX_ColumnOrdinal]<span style=color:#f92672>.</span>Name
|
||||
<span style=color:#66d9ef>ELSE</span>
|
||||
MatrixHeader <span style=color:#f92672>:=</span> MatrixRecords[MATRIX_ColumnOrdinal]<span style=color:#f92672>.</span><span style=color:#66d9ef>Code</span>;
|
||||
}
|
||||
MatrixRecord <span style=color:#f92672>:=</span> MatrixRecords[MATRIX_ColumnOrdinal];
|
||||
AnalysisValue <span style=color:#f92672>:=</span> CalcAmt<span style=color:#f92672>(</span>ValueType,TRUE<span style=color:#f92672>)</span>;
|
||||
MATRIX_CellData[MATRIX_ColumnOrdinal] <span style=color:#f92672>:=</span> AnalysisValue;
|
||||
<span style=color:#66d9ef>END</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>PROCEDURE</span> MATRIX_OnAfterGetRecord@<span style=color:#ae81ff>10</span><span style=color:#f92672>(</span>MATRIX_ColumnOrdinal : <span style=color:#66d9ef>Integer</span><span style=color:#f92672>)</span>;
|
||||
<span style=color:#66d9ef>BEGIN</span>
|
||||
MatrixRecord <span style=color:#f92672>:=</span> MatrixRecords[MATRIX_ColumnOrdinal];
|
||||
AnalysisValue <span style=color:#f92672>:=</span> CalcAmt<span style=color:#f92672>(</span>ValueType,TRUE<span style=color:#f92672>)</span>;
|
||||
MATRIX_CellData[MATRIX_ColumnOrdinal] <span style=color:#f92672>:=</span> AnalysisValue;
|
||||
<span style=color:#66d9ef>END</span>;
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -295,12 +293,12 @@ END;
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Comment Spacing :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/comments-spacing/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,13 +255,12 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Comment Spacing</h1>
|
||||
<p>Always start comments with // followed by one space character.
|
||||
Bad code</p>
|
||||
<pre><code>RowNo += 1000; //Move way below the budget
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>RowNo += 1000; // Move way below the budget
|
||||
</code></pre>
|
||||
<p>Always start comments with // followed by one space character.</p>
|
||||
<p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>RowNo <span style=color:#f92672>+=</span> <span style=color:#ae81ff>1000</span>; <span style=color:#75715e>//Move way below the budget
|
||||
</span></code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>RowNo <span style=color:#f92672>+=</span> <span style=color:#ae81ff>1000</span>; <span style=color:#75715e>// Move way below the budget
|
||||
</span></code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -274,12 +273,12 @@ Bad code</p>
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>END ELSE Pair :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/end-else-pair/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,22 +255,21 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>END ELSE Pair</h1>
|
||||
<p>The END ELSE pair should always appear on the same line.
|
||||
Bad code</p>
|
||||
<pre><code>IF OppEntry.FIND('-') THEN
|
||||
IF SalesCycleStage.FIND('-') THEN BEGIN
|
||||
...
|
||||
END
|
||||
ELSE
|
||||
...
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF OppEntry.FIND('-') THEN
|
||||
IF SalesCycleStage.FIND('-') THEN BEGIN
|
||||
...
|
||||
END ELSE
|
||||
...
|
||||
</code></pre>
|
||||
<p>The END ELSE pair should always appear on the same line.</p>
|
||||
<p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> OppEntry<span style=color:#f92672>.</span>FIND<span style=color:#f92672>(</span><span style=color:#e6db74>'-'</span><span style=color:#f92672>) </span><span style=color:#66d9ef>THEN</span>
|
||||
<span style=color:#66d9ef>IF</span> SalesCycleStage<span style=color:#f92672>.</span>FIND<span style=color:#f92672>(</span><span style=color:#e6db74>'-'</span><span style=color:#f92672>) </span><span style=color:#66d9ef>THEN</span> <span style=color:#66d9ef>BEGIN</span>
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672> </span><span style=color:#66d9ef>END</span>
|
||||
<span style=color:#66d9ef>ELSE</span>
|
||||
<span style=color:#f92672>...
|
||||
</span></code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> OppEntry<span style=color:#f92672>.</span>FIND<span style=color:#f92672>(</span><span style=color:#e6db74>'-'</span><span style=color:#f92672>) </span><span style=color:#66d9ef>THEN</span>
|
||||
<span style=color:#66d9ef>IF</span> SalesCycleStage<span style=color:#f92672>.</span>FIND<span style=color:#f92672>(</span><span style=color:#e6db74>'-'</span><span style=color:#f92672>) </span><span style=color:#66d9ef>THEN</span> <span style=color:#66d9ef>BEGIN</span>
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span><span style=color:#66d9ef>END</span> <span style=color:#66d9ef>ELSE</span>
|
||||
<span style=color:#f92672>...
|
||||
</span></code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -283,12 +282,12 @@ END ELSE
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Indentation :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/indentation/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,72 +255,59 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Indentation</h1>
|
||||
<p>In general, use an indentation of two space characters. Logical expressions in the IF, WHILE, and UNTIL parts are indented at least 3, 6, and 6 spaces respectively.
|
||||
Bad code</p>
|
||||
<pre><code>IF GLSetup."Unrealized VAT" OR
|
||||
(GLSetup."Prepayment Unrealized VAT" AND NewCVLedgEntryBuf.Prepayment)
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF GLSetup."Unrealized VAT" OR
|
||||
(GLSetup."Prepayment Unrealized VAT" AND NewCVLedgEntryBuf.Prepayment)
|
||||
</code></pre>
|
||||
<p>In general, use an indentation of two space characters. Logical expressions in the IF, WHILE, and UNTIL parts are indented at least 3, 6, and 6 spaces respectively.</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>IF GenJnlLine."Account No." <\> ICPartner.Code THEN
|
||||
ICPartner.GET("Account No.");
|
||||
IF GenJnlLine.Amount \> 0 THEN BEGIN
|
||||
...
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF GenJnlLine."Account No." <\> ICPartner.Code THEN
|
||||
ICPartner.GET("Account No.");
|
||||
IF GenJnlLine.Amount \> 0 THEN BEGIN
|
||||
...
|
||||
</code></pre>
|
||||
<p>Bad code</p>
|
||||
<pre><code>Dialog.OPEN(WindowTxt +
|
||||
'@1@@@@@@@@@@@@@@@@@@@@@@@');
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>Dialog.OPEN(
|
||||
WindowTxt +
|
||||
'@1@@@@@@@@@@@@@@@@@@@@@@@');
|
||||
</code></pre>
|
||||
<p>Bad code</p>
|
||||
<pre><code>TempOldCustLedgEntry.DELETE;
|
||||
// Find the next old entry for application of the new entry
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>TempOldCustLedgEntry.DELETE;
|
||||
// Find the next old entry for application of the new entry
|
||||
</code></pre>
|
||||
<p>Bad code</p>
|
||||
<pre><code>IF NOT ("Applies-to Doc. Type" IN
|
||||
\["Applies-to Doc. Type"::Receipt,
|
||||
"Applies-to Doc. Type"::"Return Shipment"\])
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF NOT ("Applies-to Doc. Type" IN
|
||||
\["Applies-to Doc. Type"::Receipt,
|
||||
"Applies-to Doc. Type"::"Return Shipment"\])
|
||||
</code></pre>
|
||||
<p>Bad code</p>
|
||||
<pre><code>WHILE (RemAmt \> 0) OR
|
||||
(RemAmtLCY \> 0)
|
||||
DO
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>WHILE (RemAmt \> 0) OR
|
||||
(RemAmtLCY \> 0)
|
||||
DO
|
||||
</code></pre>
|
||||
<p>Bad code</p>
|
||||
<pre><code>UNTIL (RemAmt \> 0) AND
|
||||
(RemAmtLCY \> 0);
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>UNTIL (RemAmt \> 0) AND
|
||||
(RemAmtLCY \> 0)
|
||||
</code></pre>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> GLSetup<span style=color:#f92672>.</span>"Unrealized VAT" <span style=color:#f92672>OR</span>
|
||||
<span style=color:#f92672>(</span>GLSetup<span style=color:#f92672>.</span>"Prepayment Unrealized VAT" <span style=color:#f92672>AND</span> NewCVLedgEntryBuf<span style=color:#f92672>.</span>Prepayment<span style=color:#f92672>)
|
||||
</span></code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> GLSetup<span style=color:#f92672>.</span>"Unrealized VAT" <span style=color:#f92672>OR</span>
|
||||
<span style=color:#f92672>(</span>GLSetup<span style=color:#f92672>.</span>"Prepayment Unrealized VAT" <span style=color:#f92672>AND</span> NewCVLedgEntryBuf<span style=color:#f92672>.</span>Prepayment<span style=color:#f92672>)
|
||||
</span></code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> GenJnlLine<span style=color:#f92672>.</span>"Account No." <> ICPartner<span style=color:#f92672>.</span><span style=color:#66d9ef>Code</span> <span style=color:#66d9ef>THEN</span>
|
||||
ICPartner<span style=color:#f92672>.</span>GET<span style=color:#f92672>(</span>"Account No."<span style=color:#f92672>)</span>;
|
||||
<span style=color:#66d9ef>IF</span> GenJnlLine<span style=color:#f92672>.</span>Amount \> <span style=color:#ae81ff>0</span> <span style=color:#66d9ef>THEN</span> <span style=color:#66d9ef>BEGIN</span>
|
||||
<span style=color:#f92672>...
|
||||
</span></code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> GenJnlLine<span style=color:#f92672>.</span>"Account No." <> ICPartner<span style=color:#f92672>.</span><span style=color:#66d9ef>Code</span> <span style=color:#66d9ef>THEN</span>
|
||||
ICPartner<span style=color:#f92672>.</span>GET<span style=color:#f92672>(</span>"Account No."<span style=color:#f92672>)</span>;
|
||||
<span style=color:#66d9ef>IF</span> GenJnlLine<span style=color:#f92672>.</span>Amount > <span style=color:#ae81ff>0</span> <span style=color:#66d9ef>THEN</span> <span style=color:#66d9ef>BEGIN</span>
|
||||
<span style=color:#f92672>...
|
||||
</span></code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>Dialog</span><span style=color:#f92672>.</span>OPEN<span style=color:#f92672>(</span>WindowTxt +
|
||||
<span style=color:#e6db74>'@1@@@@@@@@@@@@@@@@@@@@@@@'</span><span style=color:#f92672>)</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>Dialog</span><span style=color:#f92672>.</span>OPEN<span style=color:#f92672>(
|
||||
</span><span style=color:#f92672> </span>WindowTxt +
|
||||
<span style=color:#e6db74>'@1@@@@@@@@@@@@@@@@@@@@@@@'</span><span style=color:#f92672>)</span>;
|
||||
</code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>TempOldCustLedgEntry<span style=color:#f92672>.</span>DELETE;
|
||||
<span style=color:#75715e>// Find the next old entry for application of the new entry
|
||||
</span></code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>TempOldCustLedgEntry<span style=color:#f92672>.</span>DELETE;
|
||||
<span style=color:#75715e>// Find the next old entry for application of the new entry
|
||||
</span></code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> <span style=color:#f92672>NOT</span> <span style=color:#f92672>(</span>"Applies-to Doc. Type" <span style=color:#66d9ef>IN</span>
|
||||
["Applies-to Doc. Type"::Receipt,
|
||||
"Applies-to Doc. Type"::"Return Shipment"]<span style=color:#f92672>)
|
||||
</span></code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> <span style=color:#f92672>NOT</span> <span style=color:#f92672>(</span>"Applies-to Doc. Type" <span style=color:#66d9ef>IN</span>
|
||||
["Applies-to Doc. Type"::Receipt,
|
||||
"Applies-to Doc. Type"::"Return Shipment"]<span style=color:#f92672>)
|
||||
</span></code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>WHILE</span> <span style=color:#f92672>(</span>RemAmt > <span style=color:#ae81ff>0</span><span style=color:#f92672>) </span><span style=color:#f92672>OR</span>
|
||||
<span style=color:#f92672>(</span>RemAmtLCY > <span style=color:#ae81ff>0</span><span style=color:#f92672>)
|
||||
</span><span style=color:#f92672></span><span style=color:#66d9ef>DO</span>
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>WHILE</span> <span style=color:#f92672>(</span>RemAmt > <span style=color:#ae81ff>0</span><span style=color:#f92672>) </span><span style=color:#f92672>OR</span>
|
||||
<span style=color:#f92672>(</span>RemAmtLCY > <span style=color:#ae81ff>0</span><span style=color:#f92672>)
|
||||
</span><span style=color:#f92672></span><span style=color:#66d9ef>DO</span>
|
||||
</code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>UNTIL</span> <span style=color:#f92672>(</span>RemAmt > <span style=color:#ae81ff>0</span><span style=color:#f92672>) </span><span style=color:#f92672>AND</span>
|
||||
<span style=color:#f92672>(</span>RemAmtLCY > <span style=color:#ae81ff>0</span><span style=color:#f92672>)</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>UNTIL</span> <span style=color:#f92672>(</span>RemAmt > <span style=color:#ae81ff>0</span><span style=color:#f92672>) </span><span style=color:#f92672>AND</span>
|
||||
<span style=color:#f92672>(</span>RemAmtLCY > <span style=color:#ae81ff>0</span><span style=color:#f92672>)
|
||||
</span></code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -333,12 +320,12 @@ DO
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -6,16 +6,16 @@
|
|||
<link rel=alternate type=application/rss+xml href=/navpatterns/3-cal-coding-guidelines/readability/index.xml title="AL Guidelines">
|
||||
<meta name=description content>
|
||||
<title>Readability :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506471 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506471></script>
|
||||
<link href=/css/nucleus.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600601 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600601></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/>
|
||||
|
|
@ -33,9 +33,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506471></script>
|
||||
<script src=/js/auto-complete.js?1644506471></script>
|
||||
<script src=/js/search.js?1644506471></script>
|
||||
<script src=/js/lunr.min.js?1644600601></script>
|
||||
<script src=/js/auto-complete.js?1644600601></script>
|
||||
<script src=/js/search.js?1644600601></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -276,12 +276,12 @@ ALGuidelines.Dev
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506471></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506471></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506471></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506471></script>
|
||||
<script src=/js/featherlight.min.js?1644506471></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506471></script>
|
||||
<script src=/js/relearn.js?1644506471></script>
|
||||
<script src=/js/clipboard.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600601></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600601></script>
|
||||
<script src=/js/featherlight.min.js?1644600601></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600601></script>
|
||||
<script src=/js/relearn.js?1644600601></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,63 +1,84 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Readability on AL Guidelines</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/</link><description>Recent content in Readability on AL Guidelines</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><atom:link href="https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/index.xml" rel="self" type="application/rss+xml"/><item><title>Begin as an 'After Word'</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/begin-as-an-afterword/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/begin-as-an-afterword/</guid><description>When BEGIN follows THEN, ELSE, DO, it should be on the same line, preceded by one space character. Bad code
|
||||
IF ICPartnerRefType = ICPartnerRefType::&quot;Common Item No.&quot; THEN BEGIN ... END; Good code
|
||||
IF ICPartnerRefType = ICPartnerRefType::&quot;Common Item No.&quot; THEN BEGIN ... END;</description></item><item><title>Begin-End - Compound Only</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/begin-end/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/begin-end/</guid><description>Only use BEGIN..END to enclose compound statements. Bad code
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Readability on AL Guidelines</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/</link><description>Recent content in Readability on AL Guidelines</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><atom:link href="https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/index.xml" rel="self" type="application/rss+xml"/><item><title>Begin as an 'After Word'</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/begin-as-an-afterword/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/begin-as-an-afterword/</guid><description>When BEGIN follows THEN, ELSE, DO, it should be on the same line, preceded by one space character.
|
||||
Bad code
|
||||
IF ICPartnerRefType = ICPartnerRefType::&#34;Common Item No.&#34; THEN BEGIN ... END; Good code
|
||||
IF ICPartnerRefType = ICPartnerRefType::&quot;Common Item No.&quot; THEN BEGIN ... END;</description></item><item><title>Begin-End - Compound Only</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/begin-end/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/begin-end/</guid><description>Only use BEGIN..END to enclose compound statements.
|
||||
Bad code
|
||||
IF FINDSET THEN BEGIN REPEAT ... UNTIL NEXT = 0; END; Good code
|
||||
IF FINDSET THEN REPEAT ... UNTIL NEXT = 0; Bad code
|
||||
IF IsAssemblyOutputLine THEN BEGIN TESTFIELD(&quot;Order Line No.&quot;,0); END; Good code
|
||||
IF IsAssemblyOutputLine THEN TESTFIELD(&quot;Order Line No.&quot;,0); Bad code
|
||||
IF IsAssemblyOutputLine THEN BEGIN TESTFIELD(&#34;Order Line No.&#34;,0); END; Good code
|
||||
IF IsAssemblyOutputLine THEN TESTFIELD(&#34;Order Line No.&#34;,0); Bad code
|
||||
IF FINDSET THEN REPEAT BEGIN ... END; UNTIL NEXT = 0; Good code
|
||||
IF FINDSET THEN REPEAT .</description></item><item><title>Binary Operator to Start Line</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/binary-operator-line-start/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/binary-operator-line-start/</guid><description>Do not start a line with a binary operator. Bad code
|
||||
&quot;Quantity to Ship&quot; := Quantity - &quot;Quantity Shipped&quot; Good code
|
||||
&quot;Quantity to Ship&quot; := Quantity - &quot;Quantity Shipped&quot;</description></item><item><title>Blank Lines</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/blank-lines/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/blank-lines/</guid><description>Do not use blank lines at the beginning or end of any functions, after BEGIN, before END, or inside multiline expressions. Bad code
|
||||
PROCEDURE MATRIX\_OnDrillDown@1133(MATRIX\_ColumnOrdinal : Integer); BEGIN SetupDrillDownCol(MATRIX\_ColumnOrdinal); DrillDown(FALSE,ValueType); END; Good code
|
||||
PROCEDURE MATRIX\_OnDrillDown@1133(MATRIX\_ColumnOrdinal : Integer); BEGIN SetupDrillDownCol(MATRIX\_ColumnOrdinal); DrillDown(FALSE,ValueType); END; Bad code
|
||||
IF FINDSET THEN REPEAT ... UNTIL NEXT = 0; Exception</description></item><item><title>Binary Operator to Start Line</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/binary-operator-line-start/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/binary-operator-line-start/</guid><description>Do not start a line with a binary operator.
|
||||
Bad code
|
||||
&#34;Quantity to Ship&#34; := Quantity - &#34;Quantity Shipped&#34; Good code
|
||||
&#34;Quantity to Ship&#34; := Quantity - &#34;Quantity Shipped&#34;</description></item><item><title>Blank Lines</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/blank-lines/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/blank-lines/</guid><description>Do not use blank lines at the beginning or end of any functions, after BEGIN, before END, or inside multiline expressions.
|
||||
Bad code
|
||||
PROCEDURE MATRIX_OnDrillDown@1133(MATRIX_ColumnOrdinal : Integer); BEGIN SetupDrillDownCol(MATRIX_ColumnOrdinal); DrillDown(FALSE,ValueType); END; Good code
|
||||
PROCEDURE MATRIX_OnDrillDown@1133(MATRIX_ColumnOrdinal : Integer); BEGIN SetupDrillDownCol(MATRIX_ColumnOrdinal); DrillDown(FALSE,ValueType); END; Bad code
|
||||
IF NameIsValid AND Name2IsValid THEN Good code
|
||||
IF NameIsValid AND Name2IsValid THEN</description></item><item><title>CASE Action</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/case-actions/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/case-actions/</guid><description>A CASE action should start on a line after the possibility. Bad code
|
||||
CASE Letter OF 'A': Letter2 := '10'; 'B': Letter2 := '11'; Good code
|
||||
CASE Letter OF 'A': Letter2 := '10'; 'B': Letter2 := '11';</description></item><item><title>Colon usage in CASE</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/colon-usage-in-case/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/colon-usage-in-case/</guid><description>The last possibility on a CASE statement must be immediately followed by a colon. Bad code
|
||||
CASE DimOption OF DimOption::&quot;Global Dimension 1&quot; : DimValue.&quot;Dimension Code&quot; := GLSetup.&quot;Global Dimension 1 Code&quot;; Good code
|
||||
CASE DimOption OF DimOption::&quot;Global Dimension 1&quot;: DimValue.&quot;Dimension Code&quot; := GLSetup.&quot;Global Dimension 1 Code&quot;;</description></item><item><title>Comments inside Curly Brackets</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/comments-curly-brackets/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/comments-curly-brackets/</guid><description>Never use curly bracket comments. During development, the &ldquo;Block comment&rdquo; functionality can be used instead. However, in production code, block comments are not recommended. Bad code
|
||||
IF NameIsValid AND Name2IsValid THEN</description></item><item><title>CASE Action</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/case-actions/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/case-actions/</guid><description>A CASE action should start on a line after the possibility.
|
||||
Bad code
|
||||
CASE Letter OF &#39;A&#39;: Letter2 := &#39;10&#39;; &#39;B&#39;: Letter2 := &#39;11&#39;; Good code
|
||||
CASE Letter OF &#39;A&#39;: Letter2 := &#39;10&#39;; &#39;B&#39;: Letter2 := &#39;11&#39;;</description></item><item><title>Colon usage in CASE</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/colon-usage-in-case/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/colon-usage-in-case/</guid><description>The last possibility on a CASE statement must be immediately followed by a colon.
|
||||
Bad code
|
||||
CASE DimOption OF DimOption::&#34;Global Dimension 1&#34; : DimValue.&#34;Dimension Code&#34; := GLSetup.&#34;Global Dimension 1 Code&#34;; Good code
|
||||
CASE DimOption OF DimOption::&#34;Global Dimension 1&#34;: DimValue.&#34;Dimension Code&#34; := GLSetup.&#34;Global Dimension 1 Code&#34;;</description></item><item><title>Comments inside Curly Brackets</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/comments-curly-brackets/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/comments-curly-brackets/</guid><description>Never use curly bracket comments. During development, the &ldquo;Block comment&rdquo; functionality can be used instead. However, in production code, block comments are not recommended.
|
||||
Bad code
|
||||
PeriodTxt: {Period} Good code
|
||||
PeriodTxt: // Period Bad code
|
||||
PROCEDURE MATRIX\_OnAfterGetRecord@10(MATRIX\_ColumnOrdinal : Integer); BEGIN { IF ShowColumnName THEN MatrixHeader := MatrixRecords\[MATRIX\_ColumnOrdinal\].Name ELSE MatrixHeader := MatrixRecords\[MATRIX\_ColumnOrdinal\].Code; } MatrixRecord := MatrixRecords\[MATRIX\_ColumnOrdinal\]; AnalysisValue := CalcAmt(ValueType,TRUE); MATRIX\_CellData\[MATRIX\_ColumnOrdinal\] := AnalysisValue; END; Good code
|
||||
PROCEDURE MATRIX\_OnAfterGetRecord@10(MATRIX\_ColumnOrdinal : Integer); BEGIN MatrixRecord := MatrixRecords\[MATRIX\_ColumnOrdinal\]; AnalysisValue := CalcAmt(ValueType,TRUE); MATRIX\_CellData\[MATRIX\_ColumnOrdinal\] := AnalysisValue; END;</description></item><item><title>Comment Spacing</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/comments-spacing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/comments-spacing/</guid><description>Always start comments with // followed by one space character. Bad code
|
||||
PROCEDURE MATRIX_OnAfterGetRecord@10(MATRIX_ColumnOrdinal : Integer); BEGIN { IF ShowColumnName THEN MatrixHeader := MatrixRecords[MATRIX_ColumnOrdinal].Name ELSE MatrixHeader := MatrixRecords[MATRIX_ColumnOrdinal].Code; } MatrixRecord := MatrixRecords[MATRIX_ColumnOrdinal]; AnalysisValue := CalcAmt(ValueType,TRUE); MATRIX_CellData[MATRIX_ColumnOrdinal] := AnalysisValue; END; Good code
|
||||
PROCEDURE MATRIX_OnAfterGetRecord@10(MATRIX_ColumnOrdinal : Integer); BEGIN MatrixRecord := MatrixRecords[MATRIX_ColumnOrdinal]; AnalysisValue := CalcAmt(ValueType,TRUE); MATRIX_CellData[MATRIX_ColumnOrdinal] := AnalysisValue; END;</description></item><item><title>Comment Spacing</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/comments-spacing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/comments-spacing/</guid><description>Always start comments with // followed by one space character.
|
||||
Bad code
|
||||
RowNo += 1000; //Move way below the budget Good code
|
||||
RowNo += 1000; // Move way below the budget</description></item><item><title>END ELSE Pair</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/end-else-pair/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/end-else-pair/</guid><description>The END ELSE pair should always appear on the same line. Bad code
|
||||
IF OppEntry.FIND('-') THEN IF SalesCycleStage.FIND('-') THEN BEGIN ... END ELSE ... Good code
|
||||
IF OppEntry.FIND('-') THEN IF SalesCycleStage.FIND('-') THEN BEGIN ... END ELSE ...</description></item><item><title>Indentation</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/indentation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/indentation/</guid><description>In general, use an indentation of two space characters. Logical expressions in the IF, WHILE, and UNTIL parts are indented at least 3, 6, and 6 spaces respectively. Bad code
|
||||
IF GLSetup.&quot;Unrealized VAT&quot; OR (GLSetup.&quot;Prepayment Unrealized VAT&quot; AND NewCVLedgEntryBuf.Prepayment) Good code
|
||||
IF GLSetup.&quot;Unrealized VAT&quot; OR (GLSetup.&quot;Prepayment Unrealized VAT&quot; AND NewCVLedgEntryBuf.Prepayment) Bad code
|
||||
IF GenJnlLine.&quot;Account No.&quot; &lt;\&gt; ICPartner.Code THEN ICPartner.GET(&quot;Account No.&quot;); IF GenJnlLine.Amount \&gt; 0 THEN BEGIN ... Good code</description></item><item><title>Keyword Pairs - Indentation</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/keyword-pairs-indentation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/keyword-pairs-indentation/</guid><description>The IF..THEN pair, WHILE..DO pair, and FOR..DO pair must appear on the same line or the same level of indentation. Bad code
|
||||
RowNo += 1000; // Move way below the budget</description></item><item><title>END ELSE Pair</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/end-else-pair/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/end-else-pair/</guid><description>The END ELSE pair should always appear on the same line.
|
||||
Bad code
|
||||
IF OppEntry.FIND(&#39;-&#39;) THEN IF SalesCycleStage.FIND(&#39;-&#39;) THEN BEGIN ... END ELSE ... Good code
|
||||
IF OppEntry.FIND(&#39;-&#39;) THEN IF SalesCycleStage.FIND(&#39;-&#39;) THEN BEGIN ... END ELSE ...</description></item><item><title>Indentation</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/indentation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/indentation/</guid><description>In general, use an indentation of two space characters. Logical expressions in the IF, WHILE, and UNTIL parts are indented at least 3, 6, and 6 spaces respectively.
|
||||
Bad code
|
||||
IF GLSetup.&#34;Unrealized VAT&#34; OR (GLSetup.&#34;Prepayment Unrealized VAT&#34; AND NewCVLedgEntryBuf.Prepayment) Good code
|
||||
IF GLSetup.&#34;Unrealized VAT&#34; OR (GLSetup.&#34;Prepayment Unrealized VAT&#34; AND NewCVLedgEntryBuf.Prepayment) Bad code
|
||||
IF GenJnlLine.&#34;Account No.&#34; &lt;&gt; ICPartner.Code THEN ICPartner.GET(&#34;Account No.&#34;); IF GenJnlLine.Amount \&gt; 0 THEN BEGIN ... Good code
|
||||
IF GenJnlLine.</description></item><item><title>Keyword Pairs - Indentation</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/keyword-pairs-indentation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/keyword-pairs-indentation/</guid><description>The IF..THEN pair, WHILE..DO pair, and FOR..DO pair must appear on the same line or the same level of indentation.
|
||||
Bad code
|
||||
IF (x = y) AND (a = b) THEN Good code
|
||||
IF (x = y) AND (a = b) THEN</description></item><item><title>Line Start Keywords</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/line-start-keywords/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/line-start-keywords/</guid><description>The END, IF, REPEAT, FOR, WHILE, ELSE and CASE statement should always start a line. Bad code
|
||||
IF (x = y) AND (a = b) THEN</description></item><item><title>Line Start Keywords</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/line-start-keywords/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/line-start-keywords/</guid><description>The END, IF, REPEAT, FOR, WHILE, ELSE and CASE statement should always start a line.
|
||||
Bad code
|
||||
IF IsContactName THEN ValidateContactName ELSE IF IsSalespersonCode THEN ValidateSalespersonCode ELSE IF IsSalesCycleCode THEN ValidatSalesCycleCode; Good code
|
||||
IF IsContactName THEN ValidateContactName ELSE IF IsSalespersonCode THEN ValidateSalespersonCode ELSE IF IsSalesCycleCode THEN ValidatSalesCycleCode;</description></item><item><title>Lonely Repeat</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/lonely-repeat/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/lonely-repeat/</guid><description>The REPEAT statement should always be alone on a line. Bad code
|
||||
IF IsContactName THEN ValidateContactName ELSE IF IsSalespersonCode THEN ValidateSalespersonCode ELSE IF IsSalesCycleCode THEN ValidatSalesCycleCode;</description></item><item><title>Lonely Repeat</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/lonely-repeat/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/lonely-repeat/</guid><description>The REPEAT statement should always be alone on a line.
|
||||
Bad code
|
||||
IF ReservEntry.FINDSET THEN REPEAT Good code
|
||||
IF ReservEntry.FINDSET THEN REPEAT</description></item><item><title>Named Invocations</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/named-invocations/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/named-invocations/</guid><description>When calling an object statically use the name, not the number Bad code
|
||||
IF ReservEntry.FINDSET THEN REPEAT</description></item><item><title>Named Invocations</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/named-invocations/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/named-invocations/</guid><description>When calling an object statically use the name, not the number
|
||||
Bad code
|
||||
PAGE.RUNMODAL(525,SalesShptLine) Good code
|
||||
PAGE.RUNMODAL(PAGE::&quot;Posted Sales Shipment Lines&quot;,SalesShptLine)</description></item><item><title>Nested WITHs</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/nested-withs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/nested-withs/</guid><description>Do not nest WITHs that reference different types of objects. Bad code
|
||||
WITH PostedWhseShptLine DO BEGIN ... WITH ItemLedgEntry DO InsertBufferRec(...,&quot;Serial No.&quot;,&quot;Lot No.&quot;,...); ... END; Good code
|
||||
WITH PostedWhseShptLine DO BEGIN ... InsertBufferRec(...,ItemLedgEntry.&quot;Serial No.&quot;,ItemLedgEntry.&quot;Lot No.&quot;,...); ... END;</description></item><item><title>One Statement Per Line</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/one-statement-per-line/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/one-statement-per-line/</guid><description>A line of code should not have more than one statement. Bad code
|
||||
IF OppEntry.FIND('-') THEN EXIT Good code
|
||||
IF OppEntry.FIND('-') THEN EXIT Bad code
|
||||
PAGE.RUNMODAL(PAGE::&#34;Posted Sales Shipment Lines&#34;,SalesShptLine)</description></item><item><title>Nested WITHs</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/nested-withs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/nested-withs/</guid><description>Do not nest WITHs that reference different types of objects.
|
||||
Bad code
|
||||
WITH PostedWhseShptLine DO BEGIN ... WITH ItemLedgEntry DO InsertBufferRec(...,&#34;Serial No.&#34;,&#34;Lot No.&#34;,...); ... END; Good code
|
||||
WITH PostedWhseShptLine DO BEGIN ... InsertBufferRec(...,ItemLedgEntry.&#34;Serial No.&#34;,ItemLedgEntry.&#34;Lot No.&#34;,...); ... END;</description></item><item><title>One Statement Per Line</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/one-statement-per-line/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/one-statement-per-line/</guid><description>A line of code should not have more than one statement.
|
||||
Bad code
|
||||
IF OppEntry.FIND(&#39;-&#39;) THEN EXIT Good code
|
||||
IF OppEntry.FIND(&#39;-&#39;) THEN EXIT Bad code
|
||||
TotalCost += Cost; TotalAmt += Amt; Good code
|
||||
TotalCost += Cost; TotalAmt += Amt;</description></item><item><title>Separate IF and ELSE</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/separate-if-and-else/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/separate-if-and-else/</guid><description>IF and ELSE statements should be on separate lines. Bad code
|
||||
IF Atom\[i+1\] = '\&gt;' THEN HasLogicalOperator := TRUE ELSE BEGIN ... END; Good code
|
||||
IF Atom\[i+1\] = '\&gt;' THEN HasLogicalOperator := TRUE ELSE BEGIN ... END;</description></item><item><title>Spacing Binary Operators</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/spacing-binary-operators/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/spacing-binary-operators/</guid><description>There must be exactly one space character on each side of a binary operator such as = + - AND OR =. The parameter comma operator however, should have no spaces. Bad code
|
||||
&quot;Line Discount %&quot; := &quot;Line Discount Amount&quot;/&quot;Line Value&quot;\*100 Good code
|
||||
&quot;Line Discount %&quot; := &quot;Line Discount Amount&quot; / &quot;Line Value&quot; \* 100; Bad code
|
||||
StartDate := CALCDATE('&lt;+'+FORMAT(Days + i)+'D\&gt;', StartDate); Good code
|
||||
StartDate := CALCDATE('&lt;+' + FORMAT(Days + i) + 'D\&gt;',StartDate); Bad code</description></item><item><title>Spacing Brackets and ::</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/spacing-brackets-and/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/spacing-brackets-and/</guid><description>There must be no spaces characters before and after [] dimension brackets symbols or :: option symbols. Bad code
|
||||
A\[i\] \[j\] := Amt; Good code
|
||||
A\[i\]\[j\] := Amt; Bad code
|
||||
&quot;Currency Exchange Rate&quot;.&quot;Fix Exchange Rate Amount&quot; :: Currency: Good code
|
||||
&quot;Currency Exchange Rate&quot;.&quot;Fix Exchange Rate Amount&quot;::Currency: Bad code
|
||||
TotalCost += Cost; TotalAmt += Amt;</description></item><item><title>Separate IF and ELSE</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/separate-if-and-else/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/separate-if-and-else/</guid><description>IF and ELSE statements should be on separate lines.
|
||||
Bad code
|
||||
IF Atom[i+1] = &#39;&gt;&#39; THEN HasLogicalOperator := TRUE ELSE BEGIN ... END; Good code
|
||||
IF Atom[i+1] = &#39;&gt;&#39; THEN HasLogicalOperator := TRUE ELSE BEGIN ... END;</description></item><item><title>Spacing Binary Operators</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/spacing-binary-operators/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/spacing-binary-operators/</guid><description>There must be exactly one space character on each side of a binary operator such as = + - AND OR =. The parameter comma operator however, should have no spaces.
|
||||
Bad code
|
||||
&#34;Line Discount %&#34; := &#34;Line Discount Amount&#34;/&#34;Line Value&#34;*100 Good code
|
||||
&#34;Line Discount %&#34; := &#34;Line Discount Amount&#34; / &#34;Line Value&#34; * 100; Bad code
|
||||
StartDate := CALCDATE(&#39;&lt;+&#39;+FORMAT(Days + i)+&#39;D&gt;&#39;, StartDate); Good code
|
||||
StartDate := CALCDATE(&#39;&lt;+&#39; + FORMAT(Days + i) + &#39;D&gt;&#39;,StartDate); Bad code</description></item><item><title>Spacing Brackets and ::</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/spacing-brackets-and/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/spacing-brackets-and/</guid><description>There must be no spaces characters before and after [] dimension brackets symbols or :: option symbols.
|
||||
Bad code
|
||||
A[i] [j] := Amt; Good code
|
||||
A[i][j] := Amt; Bad code
|
||||
&#34;Currency Exchange Rate&#34;.&#34;Fix Exchange Rate Amount&#34; :: Currency: Good code
|
||||
&#34;Currency Exchange Rate&#34;.&#34;Fix Exchange Rate Amount&#34;::Currency: Bad code
|
||||
IF FIND (Which) THEN Good code
|
||||
IF FIND(Which) THEN</description></item><item><title>Spacing Unary Operators</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/spacing-unary-operators/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/spacing-unary-operators/</guid><description>There must be no space between a unary operator and its argument (except for the NOT keyword). Bad code
|
||||
IF FIND(Which) THEN</description></item><item><title>Spacing Unary Operators</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/spacing-unary-operators/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/spacing-unary-operators/</guid><description>There must be no space between a unary operator and its argument (except for the NOT keyword).
|
||||
Bad code
|
||||
IF NOT(Type = Type::Item) THEN Good code
|
||||
IF NOT (Type = Type::Item) THEN Bad code
|
||||
DiscAmt := - &quot;Discount Amount&quot;; Good code
|
||||
DiscAmt := -&quot;Discount Amount&quot;;</description></item><item><title>Suggested Abbreviations</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/suggested-abbreviations/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/suggested-abbreviations/</guid><description>Suggested Abbreviations Whenever possible, do not use abbreviations in variables, functions and objects names.
|
||||
DiscAmt := - &#34;Discount Amount&#34;; Good code
|
||||
DiscAmt := -&#34;Discount Amount&#34;;</description></item><item><title>Suggested Abbreviations</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/suggested-abbreviations/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/suggested-abbreviations/</guid><description>Suggested Abbreviations Whenever possible, do not use abbreviations in variables, functions and objects names.
|
||||
If there is no other choice, then use the suggestions below.
|
||||
Abbreviation
|
||||
Text
|
||||
|
|
@ -103,38 +124,49 @@ Appln
|
|||
application
|
||||
Arriv
|
||||
arrival
|
||||
Asm</description></item><item><title>Temporary Variable Naming</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/temporary-variable-naming/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/temporary-variable-naming/</guid><description>The name of a temporary variable must be prefixed with the word Temp and not otherwise. Bad code
|
||||
Asm</description></item><item><title>Temporary Variable Naming</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/temporary-variable-naming/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/temporary-variable-naming/</guid><description>The name of a temporary variable must be prefixed with the word Temp and not otherwise.
|
||||
Bad code
|
||||
JobWIPBuffer@1002 : TEMPORARY Record 1018; Good code
|
||||
TempJobWIPBuffer@1002 : TEMPORARY Record 1018; Bad code
|
||||
TempJobWIPBuffer@1002 : Record 1018; Good code
|
||||
CopyOfJobWIPBuffer@1002 : Record 1018;</description></item><item><title>TextConst Suffixes</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/textconst-suffixes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/textconst-suffixes/</guid><description>TextConst variable names should have a suffix (an approved three-letter suffix: Msg, Tok, Err, Qst, Lbl, Txt) describing usage. Bad code
|
||||
CannotDeleteLine@1005 : TextConst 'ENU=You cannot delete this line because one or more rating values exists.'; ... ERROR(CannotDeleteLine,TABLECAPTION); Good code
|
||||
CannotDeleteLineErr@1005 : TextConst 'ENU=You cannot delete this line because one or more rating values exists.'; ... ERROR(CannotDeleteLineErr,TABLECAPTION); Bad code
|
||||
Text000@1011 : TextConst 'ENU=&quot;has been changed (initial a %1: %2= %3, %4= %5)&quot;'; .</description></item><item><title>Unary Operator Line End</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/unary-operator-line-end/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/unary-operator-line-end/</guid><description>Do not end a line with unary operator. Bad code
|
||||
&quot;Quantity Handled (Base)&quot; := - &quot;Quantity Handled (Base)&quot;); Good code
|
||||
&quot;Quantity Handled (Base)&quot; := - &quot;Quantity Handled (Base)&quot;);</description></item><item><title>Unnecessary Compound Parenthesis</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/unnecessary-compound-parenthesis/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/unnecessary-compound-parenthesis/</guid><description>Use parenthesis only to enclose compound expressions inside compound expressions. Bad code
|
||||
IF (&quot;Costing Method&quot; = &quot;Costing Method&quot;::Standard) THEN Good code
|
||||
IF &quot;Costing Method&quot; = &quot;Costing Method&quot;::Standard THEN Bad code
|
||||
ProfitPct = -(Profit) / CostAmt \* 100; Good code
|
||||
ProfitPct = -Profit / CostAmt \* 100;</description></item><item><title>Unnecessary ELSE</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/unnecessary-else/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/unnecessary-else/</guid><description>ELSE should not be used when the last action in the THEN part is an EXIT, BREAK, SKIP, QUIT, ERROR. Bad code
|
||||
CopyOfJobWIPBuffer@1002 : Record 1018;</description></item><item><title>TextConst Suffixes</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/textconst-suffixes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/textconst-suffixes/</guid><description>TextConst variable names should have a suffix (an approved three-letter suffix: Msg, Tok, Err, Qst, Lbl, Txt) describing usage.
|
||||
Bad code
|
||||
CannotDeleteLine@1005 : TextConst &#39;ENU=You cannot delete this line because one or more rating values exists.&#39;; ... ERROR(CannotDeleteLine,TABLECAPTION); Good code
|
||||
CannotDeleteLineErr@1005 : TextConst &#39;ENU=You cannot delete this line because one or more rating values exists.&#39;; ... ERROR(CannotDeleteLineErr,TABLECAPTION); Bad code
|
||||
Text000@1011 : TextConst &#39;ENU=&#34;has been changed (initial a %1: %2= %3, %4= %5)&#34;&#39;; .</description></item><item><title>Unary Operator Line End</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/unary-operator-line-end/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/unary-operator-line-end/</guid><description>Do not end a line with unary operator.
|
||||
Bad code
|
||||
&#34;Quantity Handled (Base)&#34; := - &#34;Quantity Handled (Base)&#34;); Good code
|
||||
&#34;Quantity Handled (Base)&#34; := - &#34;Quantity Handled (Base)&#34;);</description></item><item><title>Unnecessary Compound Parenthesis</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/unnecessary-compound-parenthesis/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/unnecessary-compound-parenthesis/</guid><description>Use parenthesis only to enclose compound expressions inside compound expressions.
|
||||
Bad code
|
||||
IF (&#34;Costing Method&#34; = &#34;Costing Method&#34;::Standard) THEN Good code
|
||||
IF &#34;Costing Method&#34; = &#34;Costing Method&#34;::Standard THEN Bad code
|
||||
ProfitPct = -(Profit) / CostAmt * 100; Good code
|
||||
ProfitPct = -Profit / CostAmt * 100;</description></item><item><title>Unnecessary ELSE</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/unnecessary-else/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/unnecessary-else/</guid><description>ELSE should not be used when the last action in the THEN part is an EXIT, BREAK, SKIP, QUIT, ERROR.
|
||||
Bad code
|
||||
IF IsAdjmtBinCodeChanged THEN ERROR(AdjmtBinCodeChangeNotAllowedErr,...) ELSE ERROR(BinCodeChangeNotAllowedErr,...); Good code
|
||||
IF IsAdjmtBinCodeChanged THEN ERROR(AdjmtBinCodeChangeNotAllowedErr,...) ERROR(BinCodeChangeNotAllowedErr,...);</description></item><item><title>Unnecessary Function Parenthesis</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/unnecessary-function-parenthesis/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/unnecessary-function-parenthesis/</guid><description>Do not use parenthesis in a function call if the function does not have any parameters. Bad code
|
||||
IF IsAdjmtBinCodeChanged THEN ERROR(AdjmtBinCodeChangeNotAllowedErr,...) ERROR(BinCodeChangeNotAllowedErr,...);</description></item><item><title>Unnecessary Function Parenthesis</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/unnecessary-function-parenthesis/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/unnecessary-function-parenthesis/</guid><description>Do not use parenthesis in a function call if the function does not have any parameters.
|
||||
Bad code
|
||||
IF ReservMgt.IsPositive() THEN Good code
|
||||
IF ReservMgt.IsPositive THEN Bad code
|
||||
IF ChangeStatusForm.RUNMODAL() &lt;\&gt; ACTION::Yes THEN Good code
|
||||
IF ChangeStatusForm.RUNMODAL &lt;\&gt; ACTION::Yes THEN</description></item><item><title>Unnecessary Separators</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/unnecessary-separators/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/unnecessary-separators/</guid><description>There should be no unnecessary separators. Bad code
|
||||
IF ChangeStatusForm.RUNMODAL() &lt;&gt; ACTION::Yes THEN Good code
|
||||
IF ChangeStatusForm.RUNMODAL &lt;&gt; ACTION::Yes THEN</description></item><item><title>Unnecessary Separators</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/unnecessary-separators/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/unnecessary-separators/</guid><description>There should be no unnecessary separators.
|
||||
Bad code
|
||||
IF Customer.FINDFIRST THEN;; Good code
|
||||
IF Customer.FINDFIRST THEN;</description></item><item><title>Unnecessary TRUE/FALSE</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/unnecessary-truefalse/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/unnecessary-truefalse/</guid><description>Do not use TRUE or FALSE keywords unnecessarily if the expression is already an logical expression. Bad code
|
||||
IF Customer.FINDFIRST THEN;</description></item><item><title>Unnecessary TRUE/FALSE</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/unnecessary-truefalse/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/unnecessary-truefalse/</guid><description>Do not use TRUE or FALSE keywords unnecessarily if the expression is already an logical expression.
|
||||
Bad code
|
||||
IF IsPositive() = TRUE THEN Good code
|
||||
IF IsPositive THEN Bad code
|
||||
IF Complete &lt;\&gt; TRUE THEN Good code
|
||||
IF NOT Complete THEN</description></item><item><title>Variable Already Scoped</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/variable-already-scoped/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/variable-already-scoped/</guid><description>Do not use scope &lsquo;&rsquo;.'' qualifier unnecessarily when a variable is already implicitly or explicitly scoped. It keeps the code simpler. Bad code
|
||||
ReturnRcptHeader.SETRANGE(ReturnRcptHeader.&quot;Return Order No.&quot;,&quot;Document No.&quot;); Good code
|
||||
ReturnRcptHeader.SETRANGE(&quot;Return Order No.&quot;,&quot;Document No.&quot;); Bad code
|
||||
IF Complete &lt;&gt; TRUE THEN Good code
|
||||
IF NOT Complete THEN</description></item><item><title>Variable Already Scoped</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/variable-already-scoped/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/variable-already-scoped/</guid><description>Do not use scope &lsquo;&rsquo;.'' qualifier unnecessarily when a variable is already implicitly or explicitly scoped. It keeps the code simpler.
|
||||
Bad code
|
||||
ReturnRcptHeader.SETRANGE(ReturnRcptHeader.&#34;Return Order No.&#34;,&#34;Document No.&#34;); Good code
|
||||
ReturnRcptHeader.SETRANGE(&#34;Return Order No.&#34;,&#34;Document No.&#34;); Bad code
|
||||
WITH ChangeLogSetupTable DO BEGIN ... IF ChangeLogSetupTable.DELETE THEN ... END; Good code
|
||||
WITH ChangeLogSetupTable DO BEGIN ... IF DELETE THEN ... END;</description></item><item><title>Variable Naming</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/variable-naming/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/variable-naming/</guid><description>Variables that refer to a C/AL object must contain the objects name, abbreviated where necessary.
|
||||
A variable must begin with a capital letter.
|
||||
Blanks, periods, and other characters (such as parentheses) that would make quotation marks around a variable necessary must be omitted.
|
||||
If a variable is a compound of two or more words or abbreviations, each word or abbreviation should begin with a capital letter. Bad code
|
||||
... WIPBuffer@1002 : Record 1018 .</description></item><item><title>Variables Declarations Order</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/variables-declarations-order/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/variables-declarations-order/</guid><description>Variables declarations should be ordered by type. In general, object and complex variable types are listed first followed by simple variables. The order should be the same as the object list in the object designer for C/AL objects. Afterwards come the complex variables like RecordRef, .NET, FieldRef etc. At the end come all the simple data types in no particular order. Bad code
|
||||
StartingDateFilter@1002 : Text\[30\]; Vend@1003 : Record 23; Good code</description></item></channel></rss>
|
||||
If a variable is a compound of two or more words or abbreviations, each word or abbreviation should begin with a capital letter.
|
||||
Bad code
|
||||
... WIPBuffer@1002 : Record 1018 .</description></item><item><title>Variables Declarations Order</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/variables-declarations-order/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/readability/variables-declarations-order/</guid><description>Variables declarations should be ordered by type. In general, object and complex variable types are listed first followed by simple variables. The order should be the same as the object list in the object designer for C/AL objects. Afterwards come the complex variables like RecordRef, .NET, FieldRef etc. At the end come all the simple data types in no particular order.
|
||||
Bad code
|
||||
StartingDateFilter@1002 : Text[30]; Vend@1003 : Record 23; Good code</description></item></channel></rss>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Keyword Pairs - Indentation :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/keyword-pairs-indentation/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,15 +255,15 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Keyword Pairs - Indentation</h1>
|
||||
<p>The IF..THEN pair, WHILE..DO pair, and FOR..DO pair must appear on the same line or the same level of indentation. Bad code</p>
|
||||
<pre><code>IF (x = y) AND
|
||||
(a = b) THEN
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF (x = y) AND
|
||||
(a = b)
|
||||
THEN
|
||||
</code></pre>
|
||||
<p>The IF..THEN pair, WHILE..DO pair, and FOR..DO pair must appear on the same line or the same level of indentation.</p>
|
||||
<p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> <span style=color:#f92672>(</span>x = y<span style=color:#f92672>) </span><span style=color:#f92672>AND</span>
|
||||
<span style=color:#f92672>(</span>a = b<span style=color:#f92672>) </span><span style=color:#66d9ef>THEN</span>
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> <span style=color:#f92672>(</span>x = y<span style=color:#f92672>) </span><span style=color:#f92672>AND</span>
|
||||
<span style=color:#f92672>(</span>a = b<span style=color:#f92672>)
|
||||
</span><span style=color:#f92672></span><span style=color:#66d9ef>THEN</span>
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -276,12 +276,12 @@ THEN
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Line Start Keywords :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/line-start-keywords/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,21 +255,21 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Line Start Keywords</h1>
|
||||
<p>The END, IF, REPEAT, FOR, WHILE, ELSE and CASE statement should always start a line. Bad code</p>
|
||||
<pre><code>IF IsContactName THEN ValidateContactName
|
||||
ELSE IF IsSalespersonCode THEN ValidateSalespersonCode
|
||||
ELSE IF IsSalesCycleCode THEN ValidatSalesCycleCode;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF IsContactName THEN
|
||||
ValidateContactName
|
||||
ELSE
|
||||
IF IsSalespersonCode THEN
|
||||
ValidateSalespersonCode
|
||||
ELSE
|
||||
IF IsSalesCycleCode THEN
|
||||
ValidatSalesCycleCode;
|
||||
</code></pre>
|
||||
<p>The END, IF, REPEAT, FOR, WHILE, ELSE and CASE statement should always start a line.</p>
|
||||
<p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> IsContactName <span style=color:#66d9ef>THEN</span> ValidateContactName
|
||||
<span style=color:#66d9ef>ELSE</span> <span style=color:#66d9ef>IF</span> IsSalespersonCode <span style=color:#66d9ef>THEN</span> ValidateSalespersonCode
|
||||
<span style=color:#66d9ef>ELSE</span> <span style=color:#66d9ef>IF</span> IsSalesCycleCode <span style=color:#66d9ef>THEN</span> ValidatSalesCycleCode;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> IsContactName <span style=color:#66d9ef>THEN</span>
|
||||
ValidateContactName
|
||||
<span style=color:#66d9ef>ELSE</span>
|
||||
<span style=color:#66d9ef>IF</span> IsSalespersonCode <span style=color:#66d9ef>THEN</span>
|
||||
ValidateSalespersonCode
|
||||
<span style=color:#66d9ef>ELSE</span>
|
||||
<span style=color:#66d9ef>IF</span> IsSalesCycleCode <span style=color:#66d9ef>THEN</span>
|
||||
ValidatSalesCycleCode;
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -282,12 +282,12 @@ ValidatSalesCycleCode;
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Lonely Repeat :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/lonely-repeat/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,14 +255,14 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Lonely Repeat</h1>
|
||||
<p>The REPEAT statement should always be alone on a line.
|
||||
Bad code</p>
|
||||
<pre><code>IF ReservEntry.FINDSET THEN REPEAT
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF ReservEntry.FINDSET THEN
|
||||
REPEAT
|
||||
</code></pre>
|
||||
<p>The REPEAT statement should always be alone on a line.</p>
|
||||
<p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> ReservEntry<span style=color:#f92672>.</span>FINDSET <span style=color:#66d9ef>THEN</span> <span style=color:#66d9ef>REPEAT</span>
|
||||
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> ReservEntry<span style=color:#f92672>.</span>FINDSET <span style=color:#66d9ef>THEN</span>
|
||||
<span style=color:#66d9ef>REPEAT</span>
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -275,12 +275,12 @@ REPEAT
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Named Invocations :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/named-invocations/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,13 +255,12 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Named Invocations</h1>
|
||||
<p>When calling an object statically use the name, not the number
|
||||
Bad code</p>
|
||||
<pre><code>PAGE.RUNMODAL(525,SalesShptLine)
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>PAGE.RUNMODAL(PAGE::"Posted Sales Shipment Lines",SalesShptLine)
|
||||
</code></pre>
|
||||
<p>When calling an object statically use the name, not the number</p>
|
||||
<p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>PAGE</span><span style=color:#f92672>.</span>RUNMODAL<span style=color:#f92672>(</span><span style=color:#ae81ff>525</span>,SalesShptLine<span style=color:#f92672>)
|
||||
</span></code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>PAGE</span><span style=color:#f92672>.</span>RUNMODAL<span style=color:#f92672>(</span><span style=color:#66d9ef>PAGE</span>::"Posted Sales Shipment Lines",SalesShptLine<span style=color:#f92672>)
|
||||
</span></code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -274,12 +273,12 @@ Bad code</p>
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Nested WITHs :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/nested-withs/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,22 +255,21 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Nested WITHs</h1>
|
||||
<p>Do not nest WITHs that reference different types of objects.
|
||||
Bad code</p>
|
||||
<pre><code>WITH PostedWhseShptLine DO BEGIN
|
||||
...
|
||||
WITH ItemLedgEntry DO
|
||||
InsertBufferRec(...,"Serial No.","Lot No.",...);
|
||||
...
|
||||
END;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>WITH PostedWhseShptLine DO BEGIN
|
||||
...
|
||||
InsertBufferRec(...,ItemLedgEntry."Serial No.",ItemLedgEntry."Lot No.",...);
|
||||
...
|
||||
END;
|
||||
</code></pre>
|
||||
<p>Do not nest WITHs that reference different types of objects.</p>
|
||||
<p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>WITH</span> PostedWhseShptLine <span style=color:#66d9ef>DO</span> <span style=color:#66d9ef>BEGIN</span>
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672> </span><span style=color:#66d9ef>WITH</span> ItemLedgEntry <span style=color:#66d9ef>DO</span>
|
||||
InsertBufferRec<span style=color:#f92672>(...</span>,"Serial No.","Lot No.",<span style=color:#f92672>...)</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span><span style=color:#66d9ef>END</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>WITH</span> PostedWhseShptLine <span style=color:#66d9ef>DO</span> <span style=color:#66d9ef>BEGIN</span>
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672> </span>InsertBufferRec<span style=color:#f92672>(...</span>,ItemLedgEntry<span style=color:#f92672>.</span>"Serial No.",ItemLedgEntry<span style=color:#f92672>.</span>"Lot No.",<span style=color:#f92672>...)</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span><span style=color:#66d9ef>END</span>;
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -283,12 +282,12 @@ END;
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>One Statement Per Line :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/one-statement-per-line/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,21 +255,21 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>One Statement Per Line</h1>
|
||||
<p>A line of code should not have more than one statement.
|
||||
Bad code</p>
|
||||
<pre><code>IF OppEntry.FIND('-') THEN EXIT
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF OppEntry.FIND('-') THEN
|
||||
EXIT
|
||||
</code></pre>
|
||||
<p>A line of code should not have more than one statement.</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>TotalCost += Cost; TotalAmt += Amt;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>TotalCost += Cost;
|
||||
TotalAmt += Amt;
|
||||
</code></pre>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> OppEntry<span style=color:#f92672>.</span>FIND<span style=color:#f92672>(</span><span style=color:#e6db74>'-'</span><span style=color:#f92672>) </span><span style=color:#66d9ef>THEN</span> <span style=color:#66d9ef>EXIT</span>
|
||||
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> OppEntry<span style=color:#f92672>.</span>FIND<span style=color:#f92672>(</span><span style=color:#e6db74>'-'</span><span style=color:#f92672>) </span><span style=color:#66d9ef>THEN</span>
|
||||
<span style=color:#66d9ef>EXIT</span>
|
||||
|
||||
</code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>TotalCost <span style=color:#f92672>+=</span> Cost; TotalAmt <span style=color:#f92672>+=</span> Amt;
|
||||
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>TotalCost <span style=color:#f92672>+=</span> Cost;
|
||||
TotalAmt <span style=color:#f92672>+=</span> Amt;
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -282,12 +282,12 @@ TotalAmt += Amt;
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Separate IF and ELSE :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/separate-if-and-else/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,18 +255,18 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Separate IF and ELSE</h1>
|
||||
<p>IF and ELSE statements should be on separate lines. Bad code</p>
|
||||
<pre><code>IF Atom\[i+1\] = '\>' THEN HasLogicalOperator := TRUE ELSE BEGIN
|
||||
...
|
||||
END;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF Atom\[i+1\] = '\>' THEN
|
||||
HasLogicalOperator := TRUE
|
||||
ELSE BEGIN
|
||||
...
|
||||
END;
|
||||
</code></pre>
|
||||
<p>IF and ELSE statements should be on separate lines.</p>
|
||||
<p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> Atom[i<span style=color:#f92672>+</span><span style=color:#ae81ff>1</span>] = <span style=color:#e6db74>'>'</span> <span style=color:#66d9ef>THEN</span> HasLogicalOperator <span style=color:#f92672>:=</span> TRUE <span style=color:#66d9ef>ELSE</span> <span style=color:#66d9ef>BEGIN</span>
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span><span style=color:#66d9ef>END</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> Atom[i<span style=color:#f92672>+</span><span style=color:#ae81ff>1</span>] = <span style=color:#e6db74>'>'</span> <span style=color:#66d9ef>THEN</span>
|
||||
HasLogicalOperator <span style=color:#f92672>:=</span> TRUE
|
||||
<span style=color:#66d9ef>ELSE</span> <span style=color:#66d9ef>BEGIN</span>
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span><span style=color:#66d9ef>END</span>;
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -279,12 +279,12 @@ END;
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Spacing Binary Operators :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/spacing-binary-operators/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,25 +255,20 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Spacing Binary Operators</h1>
|
||||
<p>There must be exactly one space character on each side of a binary operator such as = + - AND OR =. The parameter comma operator however, should have no spaces.
|
||||
Bad code</p>
|
||||
<pre><code>"Line Discount %" := "Line Discount Amount"/"Line Value"\*100
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>"Line Discount %" := "Line Discount Amount" / "Line Value" \* 100;
|
||||
</code></pre>
|
||||
<p>There must be exactly one space character on each side of a binary operator such as = + - AND OR =. The parameter comma operator however, should have no spaces.</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>StartDate := CALCDATE('<+'+FORMAT(Days + i)+'D\>', StartDate);
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>StartDate := CALCDATE('<+' + FORMAT(Days + i) + 'D\>',StartDate);
|
||||
</code></pre>
|
||||
<p>Bad code</p>
|
||||
<pre><code>StartDate := 0D; // Initialize
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>StartDate := 0D; // Initialize
|
||||
</code></pre>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>"Line Discount %" <span style=color:#f92672>:=</span> "Line Discount Amount"/"Line Value"*<span style=color:#ae81ff>100</span>
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>"Line Discount %" <span style=color:#f92672>:=</span> "Line Discount Amount" / "Line Value" * <span style=color:#ae81ff>100</span>;
|
||||
</code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>StartDate <span style=color:#f92672>:=</span> CALCDATE<span style=color:#f92672>(</span><span style=color:#e6db74>'<+'</span>+FORMAT<span style=color:#f92672>(</span>Days + i<span style=color:#f92672>)</span>+<span style=color:#e6db74>'D>'</span>, StartDate<span style=color:#f92672>)</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>StartDate <span style=color:#f92672>:=</span> CALCDATE<span style=color:#f92672>(</span><span style=color:#e6db74>'<+'</span> + FORMAT<span style=color:#f92672>(</span>Days + i<span style=color:#f92672>) </span>+ <span style=color:#e6db74>'D>'</span>,StartDate<span style=color:#f92672>)</span>;
|
||||
</code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>StartDate <span style=color:#f92672>:=</span> 0D; <span style=color:#75715e>// Initialize
|
||||
</span></code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>StartDate <span style=color:#f92672>:=</span> 0D; <span style=color:#75715e>// Initialize
|
||||
</span></code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -286,12 +281,12 @@ Bad code</p>
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Spacing Brackets and :: :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600601 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600601></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/spacing-brackets-and/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600601></script>
|
||||
<script src=/js/auto-complete.js?1644600601></script>
|
||||
<script src=/js/search.js?1644600601></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,25 +255,20 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Spacing Brackets and ::</h1>
|
||||
<p>There must be no spaces characters before and after [] dimension brackets symbols or :: option symbols.
|
||||
Bad code</p>
|
||||
<pre><code>A\[i\] \[j\] := Amt;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>A\[i\]\[j\] := Amt;
|
||||
</code></pre>
|
||||
<p>There must be no spaces characters before and after [] dimension brackets symbols or :: option symbols.</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>"Currency Exchange Rate"."Fix Exchange Rate Amount" :: Currency:
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>"Currency Exchange Rate"."Fix Exchange Rate Amount"::Currency:
|
||||
</code></pre>
|
||||
<p>Bad code</p>
|
||||
<pre><code>IF FIND (Which) THEN
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF FIND(Which) THEN
|
||||
</code></pre>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>A[i] [j] <span style=color:#f92672>:=</span> Amt;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>A[i][j] <span style=color:#f92672>:=</span> Amt;
|
||||
</code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>"Currency Exchange Rate"<span style=color:#f92672>.</span>"Fix Exchange Rate Amount" :: Currency:
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>"Currency Exchange Rate"<span style=color:#f92672>.</span>"Fix Exchange Rate Amount"::Currency:
|
||||
</code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> FIND <span style=color:#f92672>(</span>Which<span style=color:#f92672>) </span><span style=color:#66d9ef>THEN</span>
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> FIND<span style=color:#f92672>(</span>Which<span style=color:#f92672>) </span><span style=color:#66d9ef>THEN</span>
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -286,12 +281,12 @@ Bad code</p>
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600601></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600601></script>
|
||||
<script src=/js/featherlight.min.js?1644600601></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600601></script>
|
||||
<script src=/js/relearn.js?1644600601></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Spacing Unary Operators :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600601 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600601></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/spacing-unary-operators/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600601></script>
|
||||
<script src=/js/auto-complete.js?1644600601></script>
|
||||
<script src=/js/search.js?1644600601></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,19 +255,16 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Spacing Unary Operators</h1>
|
||||
<p>There must be no space between a unary operator and its argument (except for the NOT keyword).
|
||||
Bad code</p>
|
||||
<pre><code>IF NOT(Type = Type::Item) THEN
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF NOT (Type = Type::Item) THEN
|
||||
</code></pre>
|
||||
<p>There must be no space between a unary operator and its argument (except for the NOT keyword).</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>DiscAmt := - "Discount Amount";
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>DiscAmt := -"Discount Amount";
|
||||
</code></pre>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> <span style=color:#f92672>NOT</span><span style=color:#f92672>(</span><span style=color:#66d9ef>Type</span> = <span style=color:#66d9ef>Type</span>::Item<span style=color:#f92672>) </span><span style=color:#66d9ef>THEN</span>
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> <span style=color:#f92672>NOT</span> <span style=color:#f92672>(</span><span style=color:#66d9ef>Type</span> = <span style=color:#66d9ef>Type</span>::Item<span style=color:#f92672>) </span><span style=color:#66d9ef>THEN</span>
|
||||
</code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>DiscAmt <span style=color:#f92672>:=</span> - "Discount Amount";
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>DiscAmt <span style=color:#f92672>:=</span> -"Discount Amount";
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -280,12 +277,12 @@ Bad code</p>
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600601></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600601></script>
|
||||
<script src=/js/featherlight.min.js?1644600601></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600601></script>
|
||||
<script src=/js/relearn.js?1644600601></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Suggested Abbreviations :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600601 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600601></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/suggested-abbreviations/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600601></script>
|
||||
<script src=/js/auto-complete.js?1644600601></script>
|
||||
<script src=/js/search.js?1644600601></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -972,12 +972,12 @@ ALGuidelines.Dev
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600601></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600601></script>
|
||||
<script src=/js/featherlight.min.js?1644600601></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600601></script>
|
||||
<script src=/js/relearn.js?1644600601></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Temporary Variable Naming :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600601 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600601></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/temporary-variable-naming/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600601></script>
|
||||
<script src=/js/auto-complete.js?1644600601></script>
|
||||
<script src=/js/search.js?1644600601></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,18 +255,16 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Temporary Variable Naming</h1>
|
||||
<p>The name of a temporary variable must be prefixed with the word Temp and not otherwise. Bad code</p>
|
||||
<pre><code>JobWIPBuffer@1002 : TEMPORARY Record 1018;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>TempJobWIPBuffer@1002 : TEMPORARY Record 1018;
|
||||
</code></pre>
|
||||
<p>The name of a temporary variable must be prefixed with the word Temp and not otherwise.</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>TempJobWIPBuffer@1002 : Record 1018;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>CopyOfJobWIPBuffer@1002 : Record 1018;
|
||||
</code></pre>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>JobWIPBuffer@<span style=color:#ae81ff>1002</span> : <span style=color:#66d9ef>TEMPORARY</span> <span style=color:#66d9ef>Record</span> <span style=color:#ae81ff>1018</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>TempJobWIPBuffer@<span style=color:#ae81ff>1002</span> : <span style=color:#66d9ef>TEMPORARY</span> <span style=color:#66d9ef>Record</span> <span style=color:#ae81ff>1018</span>;
|
||||
</code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>TempJobWIPBuffer@<span style=color:#ae81ff>1002</span> : <span style=color:#66d9ef>Record</span> <span style=color:#ae81ff>1018</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>CopyOfJobWIPBuffer@<span style=color:#ae81ff>1002</span> : <span style=color:#66d9ef>Record</span> <span style=color:#ae81ff>1018</span>;
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -279,12 +277,12 @@ ALGuidelines.Dev
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600601></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600601></script>
|
||||
<script src=/js/featherlight.min.js?1644600601></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600601></script>
|
||||
<script src=/js/relearn.js?1644600601></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>TextConst Suffixes :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600601 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600601></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/textconst-suffixes/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600601></script>
|
||||
<script src=/js/auto-complete.js?1644600601></script>
|
||||
<script src=/js/search.js?1644600601></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,81 +255,70 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>TextConst Suffixes</h1>
|
||||
<p>TextConst variable names should have a suffix (an approved three-letter suffix: Msg, Tok, Err, Qst, Lbl, Txt) describing usage.
|
||||
Bad code</p>
|
||||
<pre><code>CannotDeleteLine@1005 : TextConst 'ENU=You cannot delete this line because one or more rating values exists.';
|
||||
...
|
||||
ERROR(CannotDeleteLine,TABLECAPTION);
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>CannotDeleteLineErr@1005 : TextConst 'ENU=You cannot delete this line because one or more rating values exists.';
|
||||
...
|
||||
ERROR(CannotDeleteLineErr,TABLECAPTION);
|
||||
</code></pre>
|
||||
<p>TextConst variable names should have a suffix (an approved three-letter suffix: Msg, Tok, Err, Qst, Lbl, Txt) describing usage.</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>Text000@1011 : TextConst 'ENU="has been changed (initial a %1: %2= %3, %4= %5)"';
|
||||
...
|
||||
SalesLine.FIELDERROR(Type,STRSUBSTNO(Text000,...);
|
||||
...
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>TypeHasBeenChangedErr@1011 : TextConst 'ENU="has been changed (initial a %1: %2= %3, %4= %5)"';
|
||||
...
|
||||
SalesLine.FIELDERROR(Type,STRSUBSTNO(TypeHasBeenChangedErr,...);
|
||||
...
|
||||
</code></pre>
|
||||
<p>Bad code</p>
|
||||
<pre><code>Text004@1004 : TextConst 'ENU=Indenting the Job Tasks \#1\#\#\#\#\#\#\#\#\#\#.';
|
||||
...
|
||||
Window@1007 : Dialog;
|
||||
...
|
||||
Window.OPEN(Text004);
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IndentingMsg@1004 : TextConst 'ENU=Indenting the Job Tasks \#1\#\#\#\#\#\#\#\#\#\#.';
|
||||
...
|
||||
Window@1007 : Dialog;
|
||||
...
|
||||
Window.OPEN(IndentingMsg);
|
||||
</code></pre>
|
||||
<p>Bad code</p>
|
||||
<pre><code>Text002@1005 : TextConst 'ENU=You cannot delete a %1 that is used in one or more setup windows.\\ Do you want to open the G/L Account No. Where-Used List Window?';
|
||||
...
|
||||
IF CONFIRM(Text002,TRUE,GLAcc.TABLECAPTION) THEN
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>OpenWhereUsedWindowQst@1005 : TextConst 'ENU=You cannot delete a %1 that is used in one or more setup windows.\\ Do you want to open the G/L Account No. Where-Used List Window?';
|
||||
...
|
||||
IF CONFIRM(OpenWhereUsedWindowQst,TRUE,GLAcc.TABLECAPTION) THEN
|
||||
</code></pre>
|
||||
<p>Bad code</p>
|
||||
<pre><code>Selection := STRMENU(Text003,2);
|
||||
...
|
||||
Text003@1002 : TextConst 'ENU=&Copy dimensions from BOM,&Retrieve dimensions from components';
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>Selection := STRMENU(CopyFromQst,2);
|
||||
...
|
||||
CopyFromQst@1002 : TextConst 'ENU=&Copy dimensions from BOM,&Retrieve dimensions from components';
|
||||
</code></pre>
|
||||
<p>Bad code</p>
|
||||
<pre><code>DATASET
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>CannotDeleteLine@<span style=color:#ae81ff>1005</span> : <span style=color:#66d9ef>TextConst</span> <span style=color:#e6db74>'ENU=You cannot delete this line because one or more rating values exists.'</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span>ERROR<span style=color:#f92672>(</span>CannotDeleteLine,TABLECAPTION<span style=color:#f92672>)</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>CannotDeleteLineErr@<span style=color:#ae81ff>1005</span> : <span style=color:#66d9ef>TextConst</span> <span style=color:#e6db74>'ENU=You cannot delete this line because one or more rating values exists.'</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span>ERROR<span style=color:#f92672>(</span>CannotDeleteLineErr,TABLECAPTION<span style=color:#f92672>)</span>;
|
||||
</code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>Text000@<span style=color:#ae81ff>1011</span> : <span style=color:#66d9ef>TextConst</span> <span style=color:#e6db74>'ENU="has been changed (initial a %1: %2= %3, %4= %5)"'</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span>SalesLine<span style=color:#f92672>.</span>FIELDERROR<span style=color:#f92672>(</span><span style=color:#66d9ef>Type</span>,STRSUBSTNO<span style=color:#f92672>(</span>Text000,<span style=color:#f92672>...)</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span></code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>TypeHasBeenChangedErr@<span style=color:#ae81ff>1011</span> : <span style=color:#66d9ef>TextConst</span> <span style=color:#e6db74>'ENU="has been changed (initial a %1: %2= %3, %4= %5)"'</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span>SalesLine<span style=color:#f92672>.</span>FIELDERROR<span style=color:#f92672>(</span><span style=color:#66d9ef>Type</span>,STRSUBSTNO<span style=color:#f92672>(</span>TypeHasBeenChangedErr,<span style=color:#f92672>...)</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span></code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>Text004@<span style=color:#ae81ff>1004</span> : <span style=color:#66d9ef>TextConst</span> <span style=color:#e6db74>'ENU=Indenting the Job Tasks \#1\#\#\#\#\#\#\#\#\#\#.'</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span>Window@<span style=color:#ae81ff>1007</span> : <span style=color:#66d9ef>Dialog</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672> </span>Window<span style=color:#f92672>.</span>OPEN<span style=color:#f92672>(</span>Text004<span style=color:#f92672>)</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>IndentingMsg@<span style=color:#ae81ff>1004</span> : <span style=color:#66d9ef>TextConst</span> <span style=color:#e6db74>'ENU=Indenting the Job Tasks \#1\#\#\#\#\#\#\#\#\#\#.'</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span>Window@<span style=color:#ae81ff>1007</span> : <span style=color:#66d9ef>Dialog</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672> </span>Window<span style=color:#f92672>.</span>OPEN<span style=color:#f92672>(</span>IndentingMsg<span style=color:#f92672>)</span>;
|
||||
</code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>Text002@<span style=color:#ae81ff>1005</span> : <span style=color:#66d9ef>TextConst</span> <span style=color:#e6db74>'ENU=You cannot delete a %1 that is used in one or more setup windows.\\ Do you want to open the G/L Account No. Where-Used List Window?'</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span><span style=color:#66d9ef>IF</span> CONFIRM<span style=color:#f92672>(</span>Text002,TRUE,GLAcc<span style=color:#f92672>.</span>TABLECAPTION<span style=color:#f92672>) </span><span style=color:#66d9ef>THEN</span>
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>OpenWhereUsedWindowQst@<span style=color:#ae81ff>1005</span> : <span style=color:#66d9ef>TextConst</span> <span style=color:#e6db74>'ENU=You cannot delete a %1 that is used in one or more setup windows.\\ Do you want to open the G/L Account No. Where-Used List Window?'</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span><span style=color:#66d9ef>IF</span> CONFIRM<span style=color:#f92672>(</span>OpenWhereUsedWindowQst,TRUE,GLAcc<span style=color:#f92672>.</span>TABLECAPTION<span style=color:#f92672>) </span><span style=color:#66d9ef>THEN</span>
|
||||
</code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>Selection <span style=color:#f92672>:=</span> STRMENU<span style=color:#f92672>(</span>Text003,<span style=color:#ae81ff>2</span><span style=color:#f92672>)</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span>Text003@<span style=color:#ae81ff>1002</span> : <span style=color:#66d9ef>TextConst</span> <span style=color:#e6db74>'ENU=&Copy dimensions from BOM,&Retrieve dimensions from components'</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al> Selection <span style=color:#f92672>:=</span> STRMENU<span style=color:#f92672>(</span>CopyFromQst,<span style=color:#ae81ff>2</span><span style=color:#f92672>)</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672> </span>CopyFromQst@<span style=color:#ae81ff>1002</span> : <span style=color:#66d9ef>TextConst</span> <span style=color:#e6db74>'ENU=&Copy dimensions from BOM,&Retrieve dimensions from components'</span>;
|
||||
</code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>DATASET</span>
|
||||
{
|
||||
...
|
||||
{ 1 ;1 ;Column ;Chart\_of\_AccountsCaption;
|
||||
SourceExpr=Chart\_of\_AccountsCaption }
|
||||
...
|
||||
Chart\_of\_AccountsCaption@9647 : TextConst 'ENU=Chart of Accounts';
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>DATASET
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672> </span>{ <span style=color:#ae81ff>1</span> ;<span style=color:#ae81ff>1</span> ;<span style=color:#66d9ef>Column</span> ;Chart_of_AccountsCaption;
|
||||
SourceExpr=Chart_of_AccountsCaption }
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span>Chart_of_AccountsCaption@<span style=color:#ae81ff>9647</span> : <span style=color:#66d9ef>TextConst</span> <span style=color:#e6db74>'ENU=Chart of Accounts'</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>DATASET</span>
|
||||
{
|
||||
...
|
||||
{ 1 ;1 ;Column ;Chart\_of\_AccountsCaption;
|
||||
SourceExpr=ChartOfAccountsLbl }
|
||||
...
|
||||
ChartOfAccountsLbl@9647 : TextConst 'ENU=Chart of Accounts';
|
||||
</code></pre>
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672> </span>{ <span style=color:#ae81ff>1</span> ;<span style=color:#ae81ff>1</span> ;<span style=color:#66d9ef>Column</span> ;Chart_of_AccountsCaption;
|
||||
SourceExpr=ChartOfAccountsLbl }
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span>ChartOfAccountsLbl@<span style=color:#ae81ff>9647</span> : <span style=color:#66d9ef>TextConst</span> <span style=color:#e6db74>'ENU=Chart of Accounts'</span>;
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -342,12 +331,12 @@ ChartOfAccountsLbl@9647 : TextConst 'ENU=Chart of Accounts';
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600601></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600601></script>
|
||||
<script src=/js/featherlight.min.js?1644600601></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600601></script>
|
||||
<script src=/js/relearn.js?1644600601></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Unary Operator Line End :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600601 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600601></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/unary-operator-line-end/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600601></script>
|
||||
<script src=/js/auto-complete.js?1644600601></script>
|
||||
<script src=/js/search.js?1644600601></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,15 +255,14 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Unary Operator Line End</h1>
|
||||
<p>Do not end a line with unary operator.
|
||||
Bad code</p>
|
||||
<pre><code>"Quantity Handled (Base)" := -
|
||||
"Quantity Handled (Base)");
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>"Quantity Handled (Base)" :=
|
||||
- "Quantity Handled (Base)");
|
||||
</code></pre>
|
||||
<p>Do not end a line with unary operator.</p>
|
||||
<p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>"Quantity Handled (Base)" <span style=color:#f92672>:=</span> -
|
||||
"Quantity Handled (Base)"<span style=color:#f92672>)</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>"Quantity Handled (Base)" <span style=color:#f92672>:=</span>
|
||||
- "Quantity Handled (Base)"<span style=color:#f92672>)</span>;
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -276,12 +275,12 @@ Bad code</p>
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600601></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600601></script>
|
||||
<script src=/js/featherlight.min.js?1644600601></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600601></script>
|
||||
<script src=/js/relearn.js?1644600601></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Unnecessary Compound Parenthesis :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600601 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600601></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/unnecessary-compound-parenthesis/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600601></script>
|
||||
<script src=/js/auto-complete.js?1644600601></script>
|
||||
<script src=/js/search.js?1644600601></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -247,15 +247,7 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<div class=progress>
|
||||
<div class=wrapper>
|
||||
<nav id=TableOfContents>
|
||||
<ul>
|
||||
<li>
|
||||
<ul>
|
||||
<li></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav id=TableOfContents></nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -263,20 +255,16 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Unnecessary Compound Parenthesis</h1>
|
||||
<p>Use parenthesis only to enclose compound expressions inside compound expressions.
|
||||
Bad code</p>
|
||||
<pre><code>IF ("Costing Method" = "Costing Method"::Standard) THEN
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF "Costing Method" = "Costing Method"::Standard THEN
|
||||
</code></pre>
|
||||
<h4 id=heading></h4>
|
||||
<p>Use parenthesis only to enclose compound expressions inside compound expressions.</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>ProfitPct = -(Profit) / CostAmt \* 100;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>ProfitPct = -Profit / CostAmt \* 100;
|
||||
</code></pre>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> <span style=color:#f92672>(</span>"Costing Method" = "Costing Method"::Standard<span style=color:#f92672>) </span><span style=color:#66d9ef>THEN</span>
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> "Costing Method" = "Costing Method"::Standard <span style=color:#66d9ef>THEN</span>
|
||||
</code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>ProfitPct = -<span style=color:#f92672>(</span>Profit<span style=color:#f92672>) </span>/ CostAmt * <span style=color:#ae81ff>100</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>ProfitPct = -Profit / CostAmt * <span style=color:#ae81ff>100</span>;
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -289,12 +277,12 @@ Bad code</p>
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600601></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600601></script>
|
||||
<script src=/js/featherlight.min.js?1644600601></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600601></script>
|
||||
<script src=/js/relearn.js?1644600601></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Unnecessary ELSE :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600601 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600601></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/unnecessary-else/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600601></script>
|
||||
<script src=/js/auto-complete.js?1644600601></script>
|
||||
<script src=/js/search.js?1644600601></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,17 +255,17 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Unnecessary ELSE</h1>
|
||||
<p>ELSE should not be used when the last action in the THEN part is an EXIT, BREAK, SKIP, QUIT, ERROR. Bad code</p>
|
||||
<pre><code>IF IsAdjmtBinCodeChanged THEN
|
||||
ERROR(AdjmtBinCodeChangeNotAllowedErr,...)
|
||||
ELSE
|
||||
ERROR(BinCodeChangeNotAllowedErr,...);
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF IsAdjmtBinCodeChanged THEN
|
||||
ERROR(AdjmtBinCodeChangeNotAllowedErr,...)
|
||||
ERROR(BinCodeChangeNotAllowedErr,...);
|
||||
</code></pre>
|
||||
<p>ELSE should not be used when the last action in the THEN part is an EXIT, BREAK, SKIP, QUIT, ERROR.</p>
|
||||
<p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> IsAdjmtBinCodeChanged <span style=color:#66d9ef>THEN</span>
|
||||
ERROR<span style=color:#f92672>(</span>AdjmtBinCodeChangeNotAllowedErr,<span style=color:#f92672>...)
|
||||
</span><span style=color:#f92672></span><span style=color:#66d9ef>ELSE</span>
|
||||
ERROR<span style=color:#f92672>(</span>BinCodeChangeNotAllowedErr,<span style=color:#f92672>...)</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> IsAdjmtBinCodeChanged <span style=color:#66d9ef>THEN</span>
|
||||
ERROR<span style=color:#f92672>(</span>AdjmtBinCodeChangeNotAllowedErr,<span style=color:#f92672>...)
|
||||
</span><span style=color:#f92672></span>ERROR<span style=color:#f92672>(</span>BinCodeChangeNotAllowedErr,<span style=color:#f92672>...)</span>;
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -278,12 +278,12 @@ ERROR(BinCodeChangeNotAllowedErr,...);
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600601></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600601></script>
|
||||
<script src=/js/featherlight.min.js?1644600601></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600601></script>
|
||||
<script src=/js/relearn.js?1644600601></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Unnecessary Function Parenthesis :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600601 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600601></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/unnecessary-function-parenthesis/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600601></script>
|
||||
<script src=/js/auto-complete.js?1644600601></script>
|
||||
<script src=/js/search.js?1644600601></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,19 +255,16 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Unnecessary Function Parenthesis</h1>
|
||||
<p>Do not use parenthesis in a function call if the function does not have any parameters.
|
||||
Bad code</p>
|
||||
<pre><code>IF ReservMgt.IsPositive() THEN
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF ReservMgt.IsPositive THEN
|
||||
</code></pre>
|
||||
<p>Do not use parenthesis in a function call if the function does not have any parameters.</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>IF ChangeStatusForm.RUNMODAL() <\> ACTION::Yes THEN
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF ChangeStatusForm.RUNMODAL <\> ACTION::Yes THEN
|
||||
</code></pre>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> ReservMgt<span style=color:#f92672>.</span>IsPositive<span style=color:#f92672>() </span><span style=color:#66d9ef>THEN</span>
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> ReservMgt<span style=color:#f92672>.</span>IsPositive <span style=color:#66d9ef>THEN</span>
|
||||
</code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> ChangeStatusForm<span style=color:#f92672>.</span>RUNMODAL<span style=color:#f92672>() </span><> <span style=color:#66d9ef>ACTION</span>::Yes <span style=color:#66d9ef>THEN</span>
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> ChangeStatusForm<span style=color:#f92672>.</span>RUNMODAL <> <span style=color:#66d9ef>ACTION</span>::Yes <span style=color:#66d9ef>THEN</span>
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -280,12 +277,12 @@ Bad code</p>
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600601></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600601></script>
|
||||
<script src=/js/featherlight.min.js?1644600601></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600601></script>
|
||||
<script src=/js/relearn.js?1644600601></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Unnecessary Separators :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600601 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600601></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/unnecessary-separators/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600601></script>
|
||||
<script src=/js/auto-complete.js?1644600601></script>
|
||||
<script src=/js/search.js?1644600601></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,12 +255,12 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Unnecessary Separators</h1>
|
||||
<p>There should be no unnecessary separators. Bad code</p>
|
||||
<pre><code>IF Customer.FINDFIRST THEN;;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF Customer.FINDFIRST THEN;
|
||||
</code></pre>
|
||||
<p>There should be no unnecessary separators.</p>
|
||||
<p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> Customer<span style=color:#f92672>.</span>FINDFIRST <span style=color:#66d9ef>THEN</span>;;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> Customer<span style=color:#f92672>.</span>FINDFIRST <span style=color:#66d9ef>THEN</span>;
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -273,12 +273,12 @@ ALGuidelines.Dev
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600601></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600601></script>
|
||||
<script src=/js/featherlight.min.js?1644600601></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600601></script>
|
||||
<script src=/js/relearn.js?1644600601></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Unnecessary TRUE/FALSE :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600601 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600601></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/unnecessary-truefalse/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600601></script>
|
||||
<script src=/js/auto-complete.js?1644600601></script>
|
||||
<script src=/js/search.js?1644600601></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,19 +255,16 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Unnecessary TRUE/FALSE</h1>
|
||||
<p>Do not use TRUE or FALSE keywords unnecessarily if the expression is already an logical expression.
|
||||
Bad code</p>
|
||||
<pre><code>IF IsPositive() = TRUE THEN
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF IsPositive THEN
|
||||
</code></pre>
|
||||
<p>Do not use TRUE or FALSE keywords unnecessarily if the expression is already an logical expression.</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>IF Complete <\> TRUE THEN
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>IF NOT Complete THEN
|
||||
</code></pre>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> IsPositive<span style=color:#f92672>() </span>= TRUE <span style=color:#66d9ef>THEN</span>
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> IsPositive <span style=color:#66d9ef>THEN</span>
|
||||
</code></pre></div><p>Bad code</p>
|
||||
<pre tabindex=0><code>IF Complete <> TRUE THEN
|
||||
</code></pre><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>IF</span> <span style=color:#f92672>NOT</span> Complete <span style=color:#66d9ef>THEN</span>
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -280,12 +277,12 @@ Bad code</p>
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600601></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600601></script>
|
||||
<script src=/js/featherlight.min.js?1644600601></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600601></script>
|
||||
<script src=/js/relearn.js?1644600601></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Variable Already Scoped :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600601 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600601></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/variable-already-scoped/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600601></script>
|
||||
<script src=/js/auto-complete.js?1644600601></script>
|
||||
<script src=/js/search.js?1644600601></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,27 +255,24 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Variable Already Scoped</h1>
|
||||
<p>Do not use scope ‘’.'' qualifier unnecessarily when a variable is already implicitly or explicitly scoped. It keeps the code simpler.
|
||||
Bad code</p>
|
||||
<pre><code>ReturnRcptHeader.SETRANGE(ReturnRcptHeader."Return Order No.","Document No.");
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>ReturnRcptHeader.SETRANGE("Return Order No.","Document No.");
|
||||
</code></pre>
|
||||
<p>Do not use scope ‘’.'' qualifier unnecessarily when a variable is already implicitly or explicitly scoped. It keeps the code simpler.</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>WITH ChangeLogSetupTable DO BEGIN
|
||||
...
|
||||
IF ChangeLogSetupTable.DELETE THEN
|
||||
...
|
||||
END;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>WITH ChangeLogSetupTable DO BEGIN
|
||||
...
|
||||
IF DELETE THEN
|
||||
...
|
||||
END;
|
||||
</code></pre>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>ReturnRcptHeader<span style=color:#f92672>.</span>SETRANGE<span style=color:#f92672>(</span>ReturnRcptHeader<span style=color:#f92672>.</span>"Return Order No.","Document No."<span style=color:#f92672>)</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>ReturnRcptHeader<span style=color:#f92672>.</span>SETRANGE<span style=color:#f92672>(</span>"Return Order No.","Document No."<span style=color:#f92672>)</span>;
|
||||
</code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>WITH</span> ChangeLogSetupTable <span style=color:#66d9ef>DO</span> <span style=color:#66d9ef>BEGIN</span>
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672> </span><span style=color:#66d9ef>IF</span> ChangeLogSetupTable<span style=color:#f92672>.</span>DELETE <span style=color:#66d9ef>THEN</span>
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span><span style=color:#66d9ef>END</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>WITH</span> ChangeLogSetupTable <span style=color:#66d9ef>DO</span> <span style=color:#66d9ef>BEGIN</span>
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672> </span><span style=color:#66d9ef>IF</span> DELETE <span style=color:#66d9ef>THEN</span>
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span><span style=color:#66d9ef>END</span>;
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -288,12 +285,12 @@ END;
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600601></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600601></script>
|
||||
<script src=/js/featherlight.min.js?1644600601></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600601></script>
|
||||
<script src=/js/relearn.js?1644600601></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Variable Naming :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600601 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600601></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/variable-naming/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600601></script>
|
||||
<script src=/js/auto-complete.js?1644600601></script>
|
||||
<script src=/js/search.js?1644600601></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -258,47 +258,42 @@ ALGuidelines.Dev
|
|||
<p>Variables that refer to a C/AL object must contain the objects name, abbreviated where necessary.</p>
|
||||
<p>A variable must begin with a capital letter.</p>
|
||||
<p>Blanks, periods, and other characters (such as parentheses) that would make quotation marks around a variable necessary must be omitted.</p>
|
||||
<p>If a variable is a compound of two or more words or abbreviations, each word or abbreviation should begin with a capital letter.
|
||||
Bad code</p>
|
||||
<pre><code>...
|
||||
WIPBuffer@1002 : Record 1018
|
||||
...
|
||||
OBJECT Table Job WIP Buffer
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>...
|
||||
JobWIPBuffer@1002 : Record 1018
|
||||
...
|
||||
OBJECT Table Job WIP Buffer
|
||||
</code></pre>
|
||||
<p>If a variable is a compound of two or more words or abbreviations, each word or abbreviation should begin with a capital letter.</p>
|
||||
<p>Bad code</p>
|
||||
<pre><code>...
|
||||
Postline@1004 : Codeunit 12;
|
||||
...
|
||||
OBJECT Codeunit Gen. Jnl.-Post Line
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>...
|
||||
GenJnlPostLine@1004 : Codeunit 12;
|
||||
...
|
||||
OBJECT Codeunit Gen. Jnl.-Post Line
|
||||
</code></pre>
|
||||
<p>Bad code</p>
|
||||
<pre><code>LOCAL PROCEDURE HandleCustDebitCredit@17(...;"Amount (LCY)"@1001 : Decimal;...);
|
||||
BEGIN
|
||||
IF ((... ("Amount (LCY)" \> 0)) ...) OR
|
||||
((... ("Amount (LCY)" < 0)) ...)
|
||||
THEN BEGIN
|
||||
...
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>LOCAL PROCEDURE HandleCustDebitCredit@17(...;AmountLCY@1001 : Decimal;...);
|
||||
BEGIN
|
||||
IF ((... (AmountLCY \> 0)) ...) OR
|
||||
((... (AmountLCY < 0)) ...)
|
||||
THEN BEGIN
|
||||
...
|
||||
</code></pre>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#f92672>...
|
||||
</span><span style=color:#f92672> </span>WIPBuffer@<span style=color:#ae81ff>1002</span> : <span style=color:#66d9ef>Record</span> <span style=color:#ae81ff>1018</span>
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span>OBJECT <span style=color:#66d9ef>Table</span> Job WIP Buffer
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#f92672>...
|
||||
</span><span style=color:#f92672> </span>JobWIPBuffer@<span style=color:#ae81ff>1002</span> : <span style=color:#66d9ef>Record</span> <span style=color:#ae81ff>1018</span>
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span>OBJECT <span style=color:#66d9ef>Table</span> Job WIP Buffer
|
||||
</code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#f92672>...
|
||||
</span><span style=color:#f92672> </span>Postline@<span style=color:#ae81ff>1004</span> : <span style=color:#66d9ef>Codeunit</span> <span style=color:#ae81ff>12</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span>OBJECT <span style=color:#66d9ef>Codeunit</span> Gen<span style=color:#f92672>. </span>Jnl<span style=color:#f92672>.</span>-Post Line
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#f92672>...
|
||||
</span><span style=color:#f92672> </span>GenJnlPostLine@<span style=color:#ae81ff>1004</span> : <span style=color:#66d9ef>Codeunit</span> <span style=color:#ae81ff>12</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span>OBJECT <span style=color:#66d9ef>Codeunit</span> Gen<span style=color:#f92672>. </span>Jnl<span style=color:#f92672>.</span>-Post Line
|
||||
</code></pre></div><p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>LOCAL</span> <span style=color:#66d9ef>PROCEDURE</span> HandleCustDebitCredit@<span style=color:#ae81ff>17</span><span style=color:#f92672>(...</span>;"Amount (LCY)"@<span style=color:#ae81ff>1001</span> : <span style=color:#66d9ef>Decimal</span>;<span style=color:#f92672>...)</span>;
|
||||
<span style=color:#66d9ef>BEGIN</span>
|
||||
<span style=color:#66d9ef>IF</span> <span style=color:#f92672>((... (</span>"Amount (LCY)" \> <span style=color:#ae81ff>0</span><span style=color:#f92672>)) ...) </span><span style=color:#f92672>OR</span>
|
||||
<span style=color:#f92672>((... (</span>"Amount (LCY)" < <span style=color:#ae81ff>0</span><span style=color:#f92672>)) ...)
|
||||
</span><span style=color:#f92672> </span><span style=color:#66d9ef>THEN</span> <span style=color:#66d9ef>BEGIN</span>
|
||||
<span style=color:#f92672>...
|
||||
</span></code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>LOCAL</span> <span style=color:#66d9ef>PROCEDURE</span> HandleCustDebitCredit@<span style=color:#ae81ff>17</span><span style=color:#f92672>(...</span>;AmountLCY@<span style=color:#ae81ff>1001</span> : <span style=color:#66d9ef>Decimal</span>;<span style=color:#f92672>...)</span>;
|
||||
<span style=color:#66d9ef>BEGIN</span>
|
||||
<span style=color:#66d9ef>IF</span> <span style=color:#f92672>((... (</span>AmountLCY \> <span style=color:#ae81ff>0</span><span style=color:#f92672>)) ...) </span><span style=color:#f92672>OR</span>
|
||||
<span style=color:#f92672>((... (</span>AmountLCY < <span style=color:#ae81ff>0</span><span style=color:#f92672>)) ...)
|
||||
</span><span style=color:#f92672> </span><span style=color:#66d9ef>THEN</span> <span style=color:#66d9ef>BEGIN</span>
|
||||
<span style=color:#f92672>...
|
||||
</span></code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -311,12 +306,12 @@ THEN BEGIN
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600601></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600601></script>
|
||||
<script src=/js/featherlight.min.js?1644600601></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600601></script>
|
||||
<script src=/js/relearn.js?1644600601></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Variables Declarations Order :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600601 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600601></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/readability/variables-declarations-order/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600601></script>
|
||||
<script src=/js/auto-complete.js?1644600601></script>
|
||||
<script src=/js/search.js?1644600601></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,14 +255,14 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Variables Declarations Order</h1>
|
||||
<p>Variables declarations should be ordered by type. In general, object and complex variable types are listed first followed by simple variables. The order should be the same as the object list in the object designer for C/AL objects. Afterwards come the complex variables like RecordRef, .NET, FieldRef etc. At the end come all the simple data types in no particular order. Bad code</p>
|
||||
<pre><code>StartingDateFilter@1002 : Text\[30\];
|
||||
Vend@1003 : Record 23;
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>Vend@1003 : Record 23;
|
||||
StartingDateFilter@1002 : Text\[30\];
|
||||
</code></pre>
|
||||
<p>Variables declarations should be ordered by type. In general, object and complex variable types are listed first followed by simple variables. The order should be the same as the object list in the object designer for C/AL objects. Afterwards come the complex variables like RecordRef, .NET, FieldRef etc. At the end come all the simple data types in no particular order.</p>
|
||||
<p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>StartingDateFilter@<span style=color:#ae81ff>1002</span> : <span style=color:#66d9ef>Text</span>[<span style=color:#ae81ff>30</span>];
|
||||
Vend@<span style=color:#ae81ff>1003</span> : <span style=color:#66d9ef>Record</span> <span style=color:#ae81ff>23</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>Vend@<span style=color:#ae81ff>1003</span> : <span style=color:#66d9ef>Record</span> <span style=color:#ae81ff>23</span>;
|
||||
StartingDateFilter@<span style=color:#ae81ff>1002</span> : <span style=color:#66d9ef>Text</span>[<span style=color:#ae81ff>30</span>];
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -275,12 +275,12 @@ StartingDateFilter@1002 : Text\[30\];
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600601></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600601></script>
|
||||
<script src=/js/featherlight.min.js?1644600601></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600601></script>
|
||||
<script src=/js/relearn.js?1644600601></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Actions - Images :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600601 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600601></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/ux/actions-images/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600601></script>
|
||||
<script src=/js/auto-complete.js?1644600601></script>
|
||||
<script src=/js/search.js?1644600601></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,18 +255,17 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>Actions - Images</h1>
|
||||
<p>All actions must have an image assigned to them.
|
||||
Bad code</p>
|
||||
<pre><code>{ 7 ;1 ;Action ;
|
||||
CaptionML=ENU=Customer - &Balance;
|
||||
RunObject=Report 121 }
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>{ 7 ;1 ;Action ;
|
||||
CaptionML=ENU=Customer - &Balance;
|
||||
RunObject=Report 121 }
|
||||
Image=Report }
|
||||
</code></pre>
|
||||
<p>All actions must have an image assigned to them.</p>
|
||||
<p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>{ <span style=color:#ae81ff>7</span> ;<span style=color:#ae81ff>1</span> ;<span style=color:#66d9ef>Action</span> ;
|
||||
CaptionML=ENU=Customer - <span style=color:#f92672>&</span>Balance;
|
||||
RunObject=<span style=color:#66d9ef>Report</span> <span style=color:#ae81ff>121</span> }
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>{ <span style=color:#ae81ff>7</span> ;<span style=color:#ae81ff>1</span> ;<span style=color:#66d9ef>Action</span> ;
|
||||
CaptionML=ENU=Customer - <span style=color:#f92672>&</span>Balance;
|
||||
RunObject=<span style=color:#66d9ef>Report</span> <span style=color:#ae81ff>121</span> }
|
||||
Image=<span style=color:#66d9ef>Report</span> }
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -279,12 +278,12 @@ Image=Report }
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600601></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600601></script>
|
||||
<script src=/js/featherlight.min.js?1644600601></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600601></script>
|
||||
<script src=/js/relearn.js?1644600601></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>CONFIRM :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600601 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600601></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/ux/confirm/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600601></script>
|
||||
<script src=/js/auto-complete.js?1644600601></script>
|
||||
<script src=/js/search.js?1644600601></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,17 +255,16 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>CONFIRM</h1>
|
||||
<p>Always end CONFIRM with a question mark.
|
||||
Bad code</p>
|
||||
<pre><code>ChangeAllOpenedEntriesQst@1000 : TextConst 'ENU=Do you want to change all open entries for every customer and vendor that are not blocked';
|
||||
...
|
||||
IF CONFIRM(ChangeAllOpenedEntriesQst,TRUE) THEN
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>ChangeAllOpenedEntriesQst@1000 : TextConst 'ENU=Do you want to change all open entries for every customer and vendor that are not blocked?';
|
||||
...
|
||||
IF CONFIRM(ChangeAllOpenedEntriesQst,TRUE) THEN
|
||||
</code></pre>
|
||||
<p>Always end CONFIRM with a question mark.</p>
|
||||
<p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>ChangeAllOpenedEntriesQst@<span style=color:#ae81ff>1000</span> : <span style=color:#66d9ef>TextConst</span> <span style=color:#e6db74>'ENU=Do you want to change all open entries for every customer and vendor that are not blocked'</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span><span style=color:#66d9ef>IF</span> CONFIRM<span style=color:#f92672>(</span>ChangeAllOpenedEntriesQst,TRUE<span style=color:#f92672>) </span><span style=color:#66d9ef>THEN</span>
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>ChangeAllOpenedEntriesQst@<span style=color:#ae81ff>1000</span> : <span style=color:#66d9ef>TextConst</span> <span style=color:#e6db74>'ENU=Do you want to change all open entries for every customer and vendor that are not blocked?'</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span><span style=color:#66d9ef>IF</span> CONFIRM<span style=color:#f92672>(</span>ChangeAllOpenedEntriesQst,TRUE<span style=color:#f92672>) </span><span style=color:#66d9ef>THEN</span>
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -278,12 +277,12 @@ IF CONFIRM(ChangeAllOpenedEntriesQst,TRUE) THEN
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600601></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600601></script>
|
||||
<script src=/js/featherlight.min.js?1644600601></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600601></script>
|
||||
<script src=/js/relearn.js?1644600601></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>FIELDERROR :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600601 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600601></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/ux/fielderror/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600601></script>
|
||||
<script src=/js/auto-complete.js?1644600601></script>
|
||||
<script src=/js/search.js?1644600601></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,17 +255,16 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>FIELDERROR</h1>
|
||||
<p>Never use FIELDERROR with a period as it is automatically inserted.
|
||||
Bad code</p>
|
||||
<pre><code>InvalidValue@1025 : TextConst 'ENU=is invalid.';
|
||||
...
|
||||
Cust.FIELDERROR("No.",InvalidValue);
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>InvalidValue@1025 : TextConst 'ENU=is invalid';
|
||||
...
|
||||
Cust.FIELDERROR("No.",InvalidValue);
|
||||
</code></pre>
|
||||
<p>Never use FIELDERROR with a period as it is automatically inserted.</p>
|
||||
<p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>InvalidValue@<span style=color:#ae81ff>1025</span> : <span style=color:#66d9ef>TextConst</span> <span style=color:#e6db74>'ENU=is invalid.'</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span>Cust<span style=color:#f92672>.</span>FIELDERROR<span style=color:#f92672>(</span>"No.",InvalidValue<span style=color:#f92672>)</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>InvalidValue@<span style=color:#ae81ff>1025</span> : <span style=color:#66d9ef>TextConst</span> <span style=color:#e6db74>'ENU=is invalid'</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span>Cust<span style=color:#f92672>.</span>FIELDERROR<span style=color:#f92672>(</span>"No.",InvalidValue<span style=color:#f92672>)</span>;
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -278,12 +277,12 @@ Cust.FIELDERROR("No.",InvalidValue);
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600601></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600601></script>
|
||||
<script src=/js/featherlight.min.js?1644600601></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600601></script>
|
||||
<script src=/js/relearn.js?1644600601></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -6,16 +6,16 @@
|
|||
<link rel=alternate type=application/rss+xml href=/navpatterns/3-cal-coding-guidelines/ux/index.xml title="AL Guidelines">
|
||||
<meta name=description content>
|
||||
<title>UX :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506471 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506471></script>
|
||||
<link href=/css/nucleus.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600601 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600601></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/ux/>
|
||||
|
|
@ -33,9 +33,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506471></script>
|
||||
<script src=/js/auto-complete.js?1644506471></script>
|
||||
<script src=/js/search.js?1644506471></script>
|
||||
<script src=/js/lunr.min.js?1644600601></script>
|
||||
<script src=/js/auto-complete.js?1644600601></script>
|
||||
<script src=/js/search.js?1644600601></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -275,12 +275,12 @@ ALGuidelines.Dev
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506471></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506471></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506471></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506471></script>
|
||||
<script src=/js/featherlight.min.js?1644506471></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506471></script>
|
||||
<script src=/js/relearn.js?1644506471></script>
|
||||
<script src=/js/clipboard.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600601></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600601></script>
|
||||
<script src=/js/featherlight.min.js?1644600601></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600601></script>
|
||||
<script src=/js/relearn.js?1644600601></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,9 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>UX on AL Guidelines</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/ux/</link><description>Recent content in UX on AL Guidelines</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><atom:link href="https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/ux/index.xml" rel="self" type="application/rss+xml"/><item><title>Actions - Images</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/ux/actions-images/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/ux/actions-images/</guid><description>All actions must have an image assigned to them. Bad code
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>UX on AL Guidelines</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/ux/</link><description>Recent content in UX on AL Guidelines</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><atom:link href="https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/ux/index.xml" rel="self" type="application/rss+xml"/><item><title>Actions - Images</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/ux/actions-images/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/ux/actions-images/</guid><description>All actions must have an image assigned to them.
|
||||
Bad code
|
||||
{ 7 ;1 ;Action ; CaptionML=ENU=Customer - &amp;Balance; RunObject=Report 121 } Good code
|
||||
{ 7 ;1 ;Action ; CaptionML=ENU=Customer - &amp;Balance; RunObject=Report 121 } Image=Report }</description></item><item><title>CONFIRM</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/ux/confirm/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/ux/confirm/</guid><description>Always end CONFIRM with a question mark. Bad code
|
||||
ChangeAllOpenedEntriesQst@1000 : TextConst 'ENU=Do you want to change all open entries for every customer and vendor that are not blocked'; ... IF CONFIRM(ChangeAllOpenedEntriesQst,TRUE) THEN Good code
|
||||
ChangeAllOpenedEntriesQst@1000 : TextConst 'ENU=Do you want to change all open entries for every customer and vendor that are not blocked?'; ... IF CONFIRM(ChangeAllOpenedEntriesQst,TRUE) THEN</description></item><item><title>FIELDERROR</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/ux/fielderror/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/ux/fielderror/</guid><description>Never use FIELDERROR with a period as it is automatically inserted. Bad code
|
||||
InvalidValue@1025 : TextConst 'ENU=is invalid.'; ... Cust.FIELDERROR(&quot;No.&quot;,InvalidValue); Good code
|
||||
InvalidValue@1025 : TextConst 'ENU=is invalid'; ... Cust.FIELDERROR(&quot;No.&quot;,InvalidValue);</description></item><item><title>MESSAGE and ERROR</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/ux/message-and-error/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/ux/message-and-error/</guid><description>Always end MESSAGE or ERROR with a period. Bad code
|
||||
CustIsBlockedErr@1025 : TextConst 'ENU=You cannot %1 this type of document when Customer %2 is blocked with type %3'; ... ERROR(CustIsBlockedErr,...); Good code
|
||||
CustIsBlockedErr@1025 : TextConst 'ENU=You cannot %1 this type of document when Customer %2 is blocked with type %3.'; ... ERROR(CustIsBlockedErr,...);</description></item></channel></rss>
|
||||
{ 7 ;1 ;Action ; CaptionML=ENU=Customer - &amp;Balance; RunObject=Report 121 } Image=Report }</description></item><item><title>CONFIRM</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/ux/confirm/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/ux/confirm/</guid><description>Always end CONFIRM with a question mark.
|
||||
Bad code
|
||||
ChangeAllOpenedEntriesQst@1000 : TextConst &#39;ENU=Do you want to change all open entries for every customer and vendor that are not blocked&#39;; ... IF CONFIRM(ChangeAllOpenedEntriesQst,TRUE) THEN Good code
|
||||
ChangeAllOpenedEntriesQst@1000 : TextConst &#39;ENU=Do you want to change all open entries for every customer and vendor that are not blocked?&#39;; ... IF CONFIRM(ChangeAllOpenedEntriesQst,TRUE) THEN</description></item><item><title>FIELDERROR</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/ux/fielderror/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/ux/fielderror/</guid><description>Never use FIELDERROR with a period as it is automatically inserted.
|
||||
Bad code
|
||||
InvalidValue@1025 : TextConst &#39;ENU=is invalid.&#39;; ... Cust.FIELDERROR(&#34;No.&#34;,InvalidValue); Good code
|
||||
InvalidValue@1025 : TextConst &#39;ENU=is invalid&#39;; ... Cust.FIELDERROR(&#34;No.&#34;,InvalidValue);</description></item><item><title>MESSAGE and ERROR</title><link>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/ux/message-and-error/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/3-cal-coding-guidelines/ux/message-and-error/</guid><description>Always end MESSAGE or ERROR with a period.
|
||||
Bad code
|
||||
CustIsBlockedErr@1025 : TextConst &#39;ENU=You cannot %1 this type of document when Customer %2 is blocked with type %3&#39;; ... ERROR(CustIsBlockedErr,...); Good code
|
||||
CustIsBlockedErr@1025 : TextConst &#39;ENU=You cannot %1 this type of document when Customer %2 is blocked with type %3.&#39;; ... ERROR(CustIsBlockedErr,...);</description></item></channel></rss>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>MESSAGE and ERROR :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506470 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506470 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506470></script>
|
||||
<link href=/css/nucleus.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600601 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600601></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/3-cal-coding-guidelines/ux/message-and-error/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506470></script>
|
||||
<script src=/js/auto-complete.js?1644506470></script>
|
||||
<script src=/js/search.js?1644506470></script>
|
||||
<script src=/js/lunr.min.js?1644600601></script>
|
||||
<script src=/js/auto-complete.js?1644600601></script>
|
||||
<script src=/js/search.js?1644600601></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -255,17 +255,16 @@ ALGuidelines.Dev
|
|||
</div>
|
||||
<main id=body-inner>
|
||||
<h1>MESSAGE and ERROR</h1>
|
||||
<p>Always end MESSAGE or ERROR with a period.
|
||||
Bad code</p>
|
||||
<pre><code>CustIsBlockedErr@1025 : TextConst 'ENU=You cannot %1 this type of document when Customer %2 is blocked with type %3';
|
||||
...
|
||||
ERROR(CustIsBlockedErr,...);
|
||||
</code></pre>
|
||||
<p>Good code</p>
|
||||
<pre><code>CustIsBlockedErr@1025 : TextConst 'ENU=You cannot %1 this type of document when Customer %2 is blocked with type %3.';
|
||||
...
|
||||
ERROR(CustIsBlockedErr,...);
|
||||
</code></pre>
|
||||
<p>Always end MESSAGE or ERROR with a period.</p>
|
||||
<p>Bad code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>CustIsBlockedErr@<span style=color:#ae81ff>1025</span> : <span style=color:#66d9ef>TextConst</span> <span style=color:#e6db74>'ENU=You cannot %1 this type of document when Customer %2 is blocked with type %3'</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span>ERROR<span style=color:#f92672>(</span>CustIsBlockedErr,<span style=color:#f92672>...)</span>;
|
||||
</code></pre></div><p>Good code</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>CustIsBlockedErr@<span style=color:#ae81ff>1025</span> : <span style=color:#66d9ef>TextConst</span> <span style=color:#e6db74>'ENU=You cannot %1 this type of document when Customer %2 is blocked with type %3.'</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span>ERROR<span style=color:#f92672>(</span>CustIsBlockedErr,<span style=color:#f92672>...)</span>;
|
||||
</code></pre></div>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -278,12 +277,12 @@ ERROR(CustIsBlockedErr,...);
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506470></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506470></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506470></script>
|
||||
<script src=/js/featherlight.min.js?1644506470></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506470></script>
|
||||
<script src=/js/relearn.js?1644506470></script>
|
||||
<script src=/js/clipboard.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600601></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600601></script>
|
||||
<script src=/js/featherlight.min.js?1644600601></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600601></script>
|
||||
<script src=/js/relearn.js?1644600601></script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue