Building a Win32 console mode application, I was using FileOpen ... something like:
VAR
FH : THandle;
BEGIN
FH := FileOpen ('DoesNotExist', fmOpenRead);
if (FH = -1) then
Writeln ('No go');
..
..
END;
So I get a warning that FH (of type THandle) may never return -1 ... but I was under the impression that THandle was a LONGINT ... which is signed, no?
So if I can't use -1 as an "error return", what am I to check for (apart from the unsigned variant ... )?