alguidelines/content/BCBestPractices/Readability/one-statement-per-line/index.md
christianbraeunlich a355c847d9 fixed typo
2022-02-10 16:06:41 +01:00

915 B

+++ title = "One Statement Per Line" weight = 910 +++

<Created by Microsoft, Described by waldo>

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

    TotalCost += Cost; TotalAmt += Amt;  

Good code

    TotalCost += Cost; 
    TotalAmt += Amt;

Discussions

You can find discussions on all "Best Practices" here.

If you don't find the discussion of this guideline, please feel free to create a new one with the same title as this article.