This commit is contained in:
JesperSchulz 2021-12-15 09:07:31 +00:00
parent cbb4b02680
commit d4c41c7a00
173 changed files with 3446 additions and 3445 deletions

View file

@ -5,16 +5,16 @@
<meta name=generator content="Hugo 0.90.1">
<meta name=description content>
<title>Begin-End - Compound Only :: AL Guidelines</title>
<link href=/css/nucleus.css?1639545896 rel=stylesheet>
<link href=/css/fontawesome-all.min.css?1639545896 rel=stylesheet>
<link href=/css/featherlight.min.css?1639545896 rel=stylesheet>
<link href=/css/perfect-scrollbar.min.css?1639545896 rel=stylesheet>
<link href=/css/auto-complete.css?1639545896 rel=stylesheet>
<link href=/css/theme.css?1639545896 rel=stylesheet>
<link href=/css/theme-blue.css?1639545896 rel=stylesheet>
<link href=/css/variant.css?1639545896 rel=stylesheet>
<link href=/css/print.css?1639545896 rel=stylesheet media=print>
<script src=/js/jquery.min.js?1639545896></script>
<link href=/css/nucleus.css?1639559246 rel=stylesheet>
<link href=/css/fontawesome-all.min.css?1639559246 rel=stylesheet>
<link href=/css/featherlight.min.css?1639559246 rel=stylesheet>
<link href=/css/perfect-scrollbar.min.css?1639559246 rel=stylesheet>
<link href=/css/auto-complete.css?1639559246 rel=stylesheet>
<link href=/css/theme.css?1639559246 rel=stylesheet>
<link href=/css/theme-blue.css?1639559246 rel=stylesheet>
<link href=/css/variant.css?1639559246 rel=stylesheet>
<link href=/css/print.css?1639559246 rel=stylesheet media=print>
<script src=/js/jquery.min.js?1639559246></script>
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
</head>
<body data-url=/bcbestpractices/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?1639545896></script>
<script src=/js/auto-complete.js?1639545896></script>
<script src=/js/search.js?1639545896></script>
<script src=/js/lunr.min.js?1639559246></script>
<script src=/js/auto-complete.js?1639559246></script>
<script src=/js/search.js?1639559246></script>
</div>
<div class=highlightable>
<ul class=topics>
@ -271,21 +271,21 @@ ALGuidelines.Dev
</span><span style=color:#f92672> </span><span style=color:#66d9ef>until</span> next<span style=color:#f92672>() </span>= <span style=color:#ae81ff>0</span>;
<span style=color:#66d9ef>end</span>;
</code></pre></div><h2 id=good-code>Good code</h2>
<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:#f92672>() </span><span style=color:#66d9ef>then</span>
<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:#f92672>() </span><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:#f92672>() </span>= <span style=color:#ae81ff>0</span>;
</code></pre></div><h2 id=bad-code-1>Bad code</h2>
<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>&#34;Order Line No.&#34;,<span style=color:#ae81ff>0</span><span style=color:#f92672>)</span>;
<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>&#34;Order Line No.&#34;, <span style=color:#ae81ff>0</span><span style=color:#f92672>)</span>;
<span style=color:#66d9ef>end</span>;
</code></pre></div><h2 id=good-code-1>Good code</h2>
<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>&#34;Order Line No.&#34;,<span style=color:#ae81ff>0</span><span style=color:#f92672>)</span>;
<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>&#34;Order Line No.&#34;, <span style=color:#ae81ff>0</span><span style=color:#f92672>)</span>;
</code></pre></div><h2 id=exception>Exception</h2>
<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><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:#75715e>//DO SOMETHING;
</span><span style=color:#75715e></span><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>)
@ -304,12 +304,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?1639545896></script>
<script src=/js/perfect-scrollbar.min.js?1639545896></script>
<script src=/js/perfect-scrollbar.jquery.min.js?1639545896></script>
<script src=/js/jquery.svg.pan.zoom.js?1639545896></script>
<script src=/js/featherlight.min.js?1639545896></script>
<script src=/js/modernizr.custom-3.6.0.js?1639545896></script>
<script src=/js/relearn.js?1639545896></script>
<script src=/js/clipboard.min.js?1639559246></script>
<script src=/js/perfect-scrollbar.min.js?1639559246></script>
<script src=/js/perfect-scrollbar.jquery.min.js?1639559246></script>
<script src=/js/jquery.svg.pan.zoom.js?1639559246></script>
<script src=/js/featherlight.min.js?1639559246></script>
<script src=/js/modernizr.custom-3.6.0.js?1639559246></script>
<script src=/js/relearn.js?1639559246></script>
</body>
</html>