No problem.

file_str_writeto(highscore_handle, (char*)&highscore, 8 );
"file_str_writeto" is meant for writing STRING or char* data.
So by telling it to write "(char*)&highscore, 8", I have told it that
there is a char* block at the same address as the double we want to send,
and that the block is 8 bytes long (the size of a double).
So it then writes the 8 bytes of our double as an 8 byte 'string'.

file_chr_read(highscore_handle, tmp); memcpy(&highscore2, tmp.chars, 8);
"file_chr_read" reads char* data into a string. So I create "tmp" 9 bytes long,
which is one byte longer than the length of a double. The extra byte is to
allow for the null character (created by the "file_str_writeto") in the file.
So our data is read out of the file and stored in the "tmp" string.
I then use memcpy to copy that data (from the tmp.chars location)
and store it in our finishing double variable.
The "tmp" string is no longer needed, so it can now be re-used if you are
going to be reading more doubles.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial