alguidelines/content/docs/BestPractices/end-else-pair/index.md
2022-03-26 09:01:43 +01:00

628 B

title tags categories
end else pair
AL
Readability
Best Practice

Created by Microsoft, Described by waldo

Description

The end else pair should always appear on the same line.

Bad code

    if OppEntry.Find('-') then
        if SalesCycleStage.Find('-') then begin
        ...
        end
        else
        begin
        ... 
        end;

Good code

    if OppEntry.Find('-') then
        if SalesCycleStage.Find('-') then begin
        ...
        end else begin
        ...
        end;