feInvalidHandle declared as typed const disallowing assignments to other constants
Original Reporter info from Mantis: Fr0sT
-
Reporter name:
Original Reporter info from Mantis: Fr0sT
- Reporter name:
Description:
In file rtl\objpas\sysutils\fileutilh.inc the feInvalidHandle constant is declared as
feInvalidHandle : THandle = THandle(-1);
so that if we want to assign it to some other constant (f.ex. for making a cross-compiler interface) we'll fail
const InvalidHandle = feInvalidHandle; // fails
Is it really necessary to use such declaration istead of
feInvalidHandle = THandle(-1);
?