FileOpen in include files?
Hi,
the 'how-to' of file open tells me:
...
Handles of files opened in the same module cannot be passed to other modules (libraries)
I do not exactly know what and how module is meant.
hmm, ok, I'll see as of tomorrow.
Anyway thanks RaptorUK
gooly
gooly:
I want to open a file in an include, setTrds.mqh:
int iTr[10][50] iTr[i][Se.HDL] = FileOpen( "Set "+i+" "+DayOfYear()+".log", FILE_BIN | FILE_READ | FILE_WRITE);
which is loaded into the EA:
1) Will the handle 'survive' until it is closed?
2) It won't be a problem to save the handle in an array? (I guess not, just to be save.)
If this is an included file, then that code is in your EA just as if you cut and pasted it into your EA. Of course the handle will survive in the array, because the array is common (globally declared) in your EA.
A module is a separately compiled unit, not an include file.
Hi,
the 'how-to' of file open tells me:
I do not exactly know what and how module is meant.
I want to open a file in an include, setTrds.mqh:
which is loaded into the EA:
#include <setTrds.mqh>Thanks in advance, gooly