# Separate IF and ELSE

##### Tags:

- C/AL
- Readability

##### Categories:

- Best Practice

IF and ELSE statements should be on separate lines.

Bad code

    IF Atom[i+1] = '>' THEN HasLogicalOperator := TRUE ELSE BEGIN
        ...
    END;

Good code

    IF Atom[i+1] = '>' THEN
        HasLogicalOperator := TRUE
    ELSE BEGIN
        ...
    END;

Last modified February 24, 2022: Added tags & categories + cleanup (5ee04366) by waldo1001