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>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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue