Forum > FPC development

[CLOSED] Improvement of Destructor TComponent.Destroy;

(1/1)

lagprogramming:
rtl/objpas/classes/compon.inc has Destructor TComponent.Destroy;
In order to exit a loop, the original code sets a zero value to variable "I".
A patch has been attached that changes the line "I := 0;" with "Break;", increasing code readability.

AlexTP:
Reported to https://gitlab.com/freepascal.org/fpc/source/-/issues/40535

AlexTP:
Declined at FPC bugtracker.

Leledumbo:

--- Quote from: AlexTP on November 22, 2023, 07:09:22 am ---Declined at FPC bugtracker.

--- End quote ---
Expected. For those who live long enough with Pascal, break and continue are indeed not inline with Pascal spirit. Most if not all of my softwares don't use it and readability enhancement is subjective.

Navigation

[0] Message Index

Go to full version