Unreachable Code

Do not write code that will never be hit.

It affects code readability and can lead to wrong assumptions.

Bad code

IF Type <> Type::FIELD THEN BEGIN
    ...
    ERROR(...);
    RecRef.CLOSE;
END;  

Good code

IF Type <> Type::FIELD THEN BEGIN
    ...
    RecRef.CLOSE;
    ERROR(...);
END;

Last modified October 23, 2025: Merge pull request #265 from igor-ctrl/patch-1 (afc35a8) by Henrik Helgesen