variable.txt file :
10;20;30;40;50
how to import the variable.txt into mql4 variable
a=10
b=20
c=30
d=40
e=50
thank you
variable.txt file :
10;20;30;40;50
how to import the variable.txt into mql4 variable
a=10
b=20
c=30
d=40
e=50
thank you
This does not reproduce the lettering indicated in your suggested output, but is perhaps a more useful example in general:
ResetLastError();
int next_int = 0;
int filehandle = FileOpen("variable.txt",FILE_READ|FILE_CSV|FILE_ANSI);
if( filehandle != INVALID_HANDLE ) {
while(!FileIsLineEnding(file_handle) && !FileIsEnding(file_handle)) {
next_int = StringToInteger(FileReadString(filehandle));
Print("the next int is ",next_int);
} // while
FileClose(filehandle);
} // if
else {
Print("FileOpen('variable.txt') failed, error= ",GetLastError());
} // else
Review the MQL4 documentation for FileOpen(), FileIsLineEnding() and FileReadString() for more clarity. Note the opened file path is relative to the MetaTrader4 Terminal path, as described in doc for FileOpen().