putvar (string FileName, string VarName, var Value)
getvar (string FileName, string VarName): var
Writes, updates or reads a variable to or from a file. Can be used for storing data globally or exchanging data between different scripts or Zorro instances.
||Name of the file. If it does not exist, it is created by putvar.
||Name of the variable.
||Value to be written or updated.
Current variable value (getvar).
If the variable does not yet exist, 0 is returned.
- If several Zorro instances access the same variable at the same time, it should be locked between reading and writing.
- The variables are stored in a normal text file that can be viewed with a text editor or spreadsheet program.
function increase_global_counter(string Name)
string FileName = "\\Log\\Counters.csv";
int Counter = getvar(FileName,Name);
file, strvar, lock