![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I decided to treat myself to some Free Software coding tonight, and you lucky folks can reap the benefit. :-) |

|
I plan to integrate this into mysql++ eventually, and its SSQLS system, but would like some feedback on what's there first. |
#3
| |||
| |||
|
|
You haven't covered the floating point case, though. The little-known XDR standard can help here: http://www.faqs.org/rfcs/rfc1832.html There should be some free XDR code out there you can kipe. |
|
It'd also be nice if you could mass-convert the entire array at once. |
#4
| |||
| |||
|
|
It'd also be nice if you could mass-convert the entire array at once. Can you expound on that? Not sure what you mean. |
#5
| |||
| |||
|
|
It appears that data is stored in the array in "network order", and data is converted appropriately when data goes into the array and when it comes out. If so, my concern is of the efficiency hit. |
#6
| |||
| |||
|
|
You haven't covered the floating point case, though. The little-known XDR standard can help here: http://www.faqs.org/rfcs/rfc1832.html There should be some free XDR code out there you can kipe. |
#7
| |||
| |||
|
|
On Fri, Dec 02, 2005 at 11:33:04AM -0700, Warren Young wrote: It appears that data is stored in the array in "network order", and data is converted appropriately when data goes into the array and when it comes out. If so, my concern is of the efficiency hit. Ahh, good point. Will have to ponder that some more. It might make sense to default to this behaviour. |
#8
| |||
| |||
|
|
On Fri, Dec 02, 2005 at 05:58:18AM -0700, Warren Young wrote: You haven't covered the floating point case, though. The little-known XDR standard can help here: http://www.faqs.org/rfcs/rfc1832.html There should be some free XDR code out there you can kipe. I took a look at the RFC, and it appears they use IEEE floating point format to store floats and doubles. |

|
This is the same format used in C++, as far as I know. |
#9
| |||
| |||
|
|
This is the same format used in C++, as far as I know. The IEEE standard allows for different byte ordering. To illustrate: Run on an x86 box (Linux with GCC or WinXP with VC++), I get: sizeof x = 8, value = F6 28 5C 8F C2 35 45 40 Run on a G5 PowerMac (GCC 4), I get: sizeof x = 8, value = 40 45 35 C2 8F 5C 28 F6 |
![]() |
| Thread Tools | |
| Display Modes | |
| |