DEF probe( )
DECL STATE_T st_open, st_read, st_eof, st_close
DECL MODUS_T md
DECL INT hFile, nRead
DECL CHAR fname[32]
DECL CHAR fmode[4]
DECL CHAR lineBuf[128]
DECL BOOL bEOF
md = #SYNC
hFile = 0
nRead = 0
bEOF = FALSE
fname[] = "D:\test.txt"
fmode[] = "r"
CWRITE($FCT_CALL, st_open, md, "krl_fopen", fname[], fmode[], hFile)
CWRITE($FCT_CALL, st_read, md, "krl_fgets", hFile, lineBuf[], 128, nRead)
CWRITE($FCT_CALL, st_eof, md, "krl_feof", hFile, bEOF)
CWRITE($FCT_CALL, st_close, md, "krl_fclose", hFile)
HALT
END