02-16-2023, 01:38 PM
As the others have indicated here, you would do well with UDT. Because with the _MEM gang it could turn into a headache. You would have to keep track which data begins at what byte, and it has to be the right type or QB64 compiler complains.
UDT's are clunky to work with sometimes but the alternative is to keep one array for each type like LONG, DOUBLE, STRING etc., for specific data and then use clearly-labelled constants as subscripts to make programming documentation easier.
If it's important to you to have the data to store and then to recall in human readable format, might opt for strings and choose which delimeter. Then pick up a good parser there somewhere to distinguish words from numerals. This way is necessary if you require storing a data type which is beyond the limits of one supported by QB64(PE). For example, if you need a number larger than 18 trilliard.
UDT's are clunky to work with sometimes but the alternative is to keep one array for each type like LONG, DOUBLE, STRING etc., for specific data and then use clearly-labelled constants as subscripts to make programming documentation easier.
If it's important to you to have the data to store and then to recall in human readable format, might opt for strings and choose which delimeter. Then pick up a good parser there somewhere to distinguish words from numerals. This way is necessary if you require storing a data type which is beyond the limits of one supported by QB64(PE). For example, if you need a number larger than 18 trilliard.