micik - 2024-08-17

Hello,
if I try to use ERR_Ok in my code to check whether the file is open correctly or not, I get an error "Identifier ERR_OK not recognized", I can use plain 0 (zero) instead.
But in general, is this a proper way to check for success of file operation since the 4th parameter is a poinmter to RTS_IEC_RESULT, and normally I would expect this to be used somehow.

_hFile := SysFileOpen(_sFileName, am:=SysFile.ACCESS_MODE.AM_WRITE, ADR(_result));
    IF _result <> 0 THEN
        udDiag := 100;
        RETURN;
 

Last edit: micik 2024-08-17