This commit is contained in:
TheDoubleH 2022-02-11 17:30:04 +00:00
parent de09820554
commit e4f08bf9a7
187 changed files with 6620 additions and 6342 deletions

View file

@ -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>&quot;Line Discount %&quot; := &quot;Line Discount Amount&quot;/&quot;Line Value&quot;\*100
</code></pre>
<p>Good code</p>
<pre><code>&quot;Line Discount %&quot; := &quot;Line Discount Amount&quot; / &quot;Line Value&quot; \* 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('&lt;+'+FORMAT(Days + i)+'D\&gt;', StartDate);
</code></pre>
<p>Good code</p>
<pre><code>StartDate := CALCDATE('&lt;+' + FORMAT(Days + i) + 'D\&gt;',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>&#34;Line Discount %&#34; <span style=color:#f92672>:=</span> &#34;Line Discount Amount&#34;/&#34;Line Value&#34;*<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>&#34;Line Discount %&#34; <span style=color:#f92672>:=</span> &#34;Line Discount Amount&#34; / &#34;Line Value&#34; * <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>&#39;&lt;+&#39;</span>+FORMAT<span style=color:#f92672>(</span>Days + i<span style=color:#f92672>)</span>+<span style=color:#e6db74>&#39;D&gt;&#39;</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>&#39;&lt;+&#39;</span> + FORMAT<span style=color:#f92672>(</span>Days + i<span style=color:#f92672>) </span>+ <span style=color:#e6db74>&#39;D&gt;&#39;</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>