- You write first the length of the string to the stream ("network
> long") and then the string itself.
>
I thought of this before, but this ain't possible, as "ptr" cannot be
jumped directly to the string length variable without exactly knowing the
string length. Correct me if I'm wrong.
OK, here is my correction: If you read from the stream you get the string
length first from ptr and read "string length" bytes then. When you write
to the stream you write the string length first and the string's bytes
afterwards.
I would have preferred this one.
However, you have to be prepared for side effects by introducing such a
construct in a version 4 database.
Regards,
Daniel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel