I need the best format to write a large DAT file with numbers from a loop.
idea:
openfile of some sort
For c1 = 1 to x
For c2 = 1 to y
For c3 = 1 to z
Write (c1,c2,c3,c1*c2*c3) to a file in some number format
next
next
next
closefile of somesort
In other words which keywords do I use? FilePut, FileWite etc.
If anyone has an example I'd appreciate it very much....
If it was me doing this then I'd put all the values into a table and simply save the table to CSV.
I would think that this would be faster than writing each value to the file separately.
The best approach is to use a random access file.
Open the file with FileOpen(c,"filename",cRandom).
Now you have two options:
1. Use FileGet / FilePut and save the numbers as double type (8 bytes per number).
2. BETTER: Use BinaryFile to write and read the required types.
If large data will be splited in two or more data files and then do some filters in opening a necessary file where to read particular data, is it an advantage in some way or not?