alguidelines/bcbestpractices/readability/index.xml
2021-12-14 20:54:33 +00:00

25 lines
No EOL
7.6 KiB
XML

<?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/bcbestpractices/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/bcbestpractices/readability/index.xml" rel="self" type="application/rss+xml"/><item><title>Named Invocations</title><link>https://alguidelines.dev/bcbestpractices/readability/named-invocations/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/bcbestpractices/readability/named-invocations/</guid><description>&amp;lt;Created by Microsoft, Described by waldo&amp;gt;
Description When calling an object statically use the Object Name, not the Object Id.
Bad code Page.RunModal(525,SalesShptLine) Good code Page.RunModal(Page::&amp;#34;Posted Sales Shipment Lines&amp;#34;,SalesShptLine) Discussions You can find discussions on all &amp;ldquo;Best Practices&amp;rdquo; here.
If you don&amp;rsquo;t find the discussion of this guideline, please feel fee to create a new one with the same title as this article.</description></item><item><title>One Statement Per Line</title><link>https://alguidelines.dev/bcbestpractices/readability/one-statement-per-line/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/bcbestpractices/readability/one-statement-per-line/</guid><description>&amp;lt;Created by Microsoft, Described by waldo&amp;gt;
Description A line of code should not have more than one statement.
Bad code if OppEntry.Find(&amp;#39;-&amp;#39;) then exit(); Good code if OppEntry.Find(&amp;#39;-&amp;#39;) then exit(); Bad code TotalCost += Cost; TotalAmt += Amt; Good code TotalCost += Cost; TotalAmt += Amt; Discussions You can find discussions on all &amp;ldquo;Best Practices&amp;rdquo; here.
If you don&amp;rsquo;t find the discussion of this guideline, please feel fee to create a new one with the same title as this article.</description></item><item><title>Separate if and else</title><link>https://alguidelines.dev/bcbestpractices/readability/separate-if-and-else/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/bcbestpractices/readability/separate-if-and-else/</guid><description>&amp;lt;Created by Microsoft, Described by waldo&amp;gt;
Description if and else statements should be on separate lines.
Bad code if Atom = &amp;#39;\&amp;gt;&amp;#39; then HasLogicalOperator := TRUE else begin ... end; Good code if Atom = &amp;#39;\&amp;gt;&amp;#39; then HasLogicalOperator := true else begin ... end; Discussions You can find discussions on all &amp;ldquo;Best Practices&amp;rdquo; here.
If you don&amp;rsquo;t find the discussion of this guideline, please feel fee to create a new one with the same title as this article.</description></item><item><title>Spacing Binary Operators</title><link>https://alguidelines.dev/bcbestpractices/readability/spacing-binary-operators/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/bcbestpractices/readability/spacing-binary-operators/</guid><description>&amp;lt;Created by Microsoft, Described by waldo&amp;gt;
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 a space after the comma.
Bad code &amp;#34;Line Discount %&amp;#34; := &amp;#34;Line Discount Amount&amp;#34;/&amp;#34;Line Value&amp;#34;*100; Good code &amp;#34;Line Discount %&amp;#34; := &amp;#34;Line Discount Amount&amp;#34; / &amp;#34;Line Value&amp;#34; * 100; Bad code StartDate := CalcDate(&amp;#39;&amp;lt;+&amp;#39;+Format(Days+i)+&amp;#39;D\&amp;gt;&amp;#39;,StartDate); Good code StartDate := CalcDate(&amp;#39;&amp;lt;+&amp;#39; + Format(Days + i) + &amp;#39;D\&amp;gt;&amp;#39;, StartDate); Bad code StartDate:=0D; // Initialize Good code StartDate := 0D; // Initialize</description></item><item><title>Suggested Abbreviations</title><link>https://alguidelines.dev/bcbestpractices/readability/suggested-abbreviations/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/bcbestpractices/readability/suggested-abbreviations/</guid><description>&amp;lt;Created by Microsoft, Described by waldo&amp;gt;
Description Whenever possible, do not use abbreviations in variables, functions and objects names.
If there is no other choice, then use the suggestions below.
word Abbreviation absence Abs account Acc accounting Acc accumulated Accum action Act activity Activ additional Add address Addr adjust Adj adjusted Adjd adjustment Adjmt agreement Agrmt allocation Alloc allowance Allow alternative Alt amount Amt amounts Amts answer Ans applies Appl application Appln arrival Arriv assembly Asm assemble to order ATO assignment Assgnt associated Assoc attachment Attmt authorities Auth automatic Auto availability Avail average Avg ba db.</description></item><item><title>Unnecessary 'else'</title><link>https://alguidelines.dev/bcbestpractices/readability/unnecessary-else/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/bcbestpractices/readability/unnecessary-else/</guid><description>&amp;lt;Created by Microsoft, Described by waldo&amp;gt;
Description else should not be used when the last action in the then part is an exit, break, skip, quit, error.
Bad code procedure SomeProcedure() begin if IsAdjmtBinCodeChanged then Error(AdjmtBinCodeChangeNotAllowedErr,...) else Error(BinCodeChangeNotAllowedErr,...); end; Good code procedure SomeProcedure() begin if IsAdjmtBinCodeChanged then Error(AdjmtBinCodeChangeNotAllowedErr,...) Error(BinCodeChangeNotAllowedErr,...); end; Discussions You can find discussions on all &amp;ldquo;Best Practices&amp;rdquo; here.
If you don&amp;rsquo;t find the discussion of this guideline, please feel fee to create a new one with the same title as this article.</description></item><item><title>Variable Naming</title><link>https://alguidelines.dev/bcbestpractices/readability/variable-naming/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/bcbestpractices/readability/variable-naming/</guid><description>&amp;lt;Created by Microsoft, Described by waldo&amp;gt;
Description Variables that refer to a 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.</description></item><item><title>Variables Declarations Order</title><link>https://alguidelines.dev/bcbestpractices/readability/variables-declarations-order/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/bcbestpractices/readability/variables-declarations-order/</guid><description>&amp;lt;Created by Microsoft, Described by waldo&amp;gt;
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:
Record Report Codeunit XmlPort Page Query Notification BigText DateFormula RecordId RecordRef FieldRef FilterPageBuilder (Ref: Microsoft Docs)
Bad code StartingDateFilter : Text; Vendor : Record Vendor; Good code Vendor : Record Vendor; StartingDateFilter : Text; Discussions You can find discussions on all &amp;ldquo;Best Practices&amp;rdquo; here.</description></item></channel></rss>