From a file to an array. - page 2

 
Murray Mbugua:

I don't know if I am supposed to open a new topic for this but I have a follow up question. Why is it that this code...

... creates an empty bin file while this one..

... creates a csv file with the required values?

doc

A simple f1 with the cursor on FileWrite said this. Learn using it.

 
Murray Mbugua:

I don't know if I am supposed to open a new topic for this but I have a follow up question. Why is it that this code...

... creates an empty bin file while this one..

int fileHandle=FileOpen("test one.bin",FILE_READ|FILE_WRITE|FILE_BIN);
for (int i=0; i<50; i++){
   
   FileWrite(fileHandle,ans);

Now you are trying to create a binary file, using a text function.

 
Nelson Wanyama:

You can format your datetime variables to int, then convert them back on reading since

This worked. Thanks

 
William Roeder:

Now you are trying to create a binary file, using a text function.

**facepalm**

thank you.

 
Thanks for chipping in guys. I completed the script.