[fpc-pascal] *etFTime -> File*etDate
Ched
charles.edouard.des.vastes.vignes at gmail.com
Sun Oct 13 20:03:34 CEST 2019
Hello,
In https://www.freepascal.org/docs-html/rtl/sysutils/filenameroutines.html ,
FileSetDate <https://www.freepascal.org/docs-html/rtl/sysutils/filesetdate.html>Get file dates should be
corrected to _S_et .
Now, my real problem is that the following code is compiled when SYS is not defined, and isn't when it
is, and I really don't know why.
PROGRAM QQ;
{ $DEFINE SYS}
USES
{$IFDEF SYS}
SYSUTILS;
{$ELSE}
DOS;
{$ENDIF}
VAR
FO: FILE OF DOUBLE;
L: LONGINT;
BEGIN
ASSIGN(FO, 'blabla.bin');
RESET(FO);
{$IFDEF SYS}
L:=FILEGETDATE(FO); { Got File, expected LongInt }
{$ELSE}
GETFTIME(FO, L);
{$ENDIF}
CLOSE(FO);
END.
Well, it appears that I prbably haven't fully understand the dos->sysutils conversion.
Cheers, Ched'
More information about the fpc-pascal
mailing list