There is no direct call to save 64 bit values, but I will happily add that in 1.5. You can work around this using sprintf to create a numeric string and save the string. This will be compatible with a future
implementation. You can retrieve the value into a text buffer and use sscanf to convert it back into binary.
As an alternative, use the binary set and get of Fl_Preferences to directly write the data. Note that the byte order my be different on other machines, so if you want to make the preferences file portable,
you need to call `htonl`, for example, before and after setting and getting you value.
Thanks Matthias, That's what I ended up doing. I found those versions of get/set when I was trying to save and recover encrypted text. As this would very easily be invalid UTF-8 characters, I needed some way of storing as binary. The only catch was that I already
had the entry in the .prefs file as an empty string and that confused me as it looked like the get seemed to produce random data. After stepping through the Fl_Preferences::get code I saw what it was doing, and deleting the existing entries from the .prefs
made the problem go away.
Thanks for the warning on byte order. That confused me for a while when I saw 1024 saved as 0004000000000000. I would like the code to be portable, but I am not too concerned about copying the .prefs file, as I have other differences between the usages on
W11 and Debian. So as long as I get reproducible behaviour on one system, I'm happy.
Phil.