[fpc-pascal] TStringStream.DataString returns garbage?

Marco van de Voort marcov at stack.nl
Fri Feb 3 11:17:04 CET 2012


In our previous episode, michael.vancanneyt at wisa.be said:
> > If necessary I would simply add a separate version "writetext", and not
> > multiplex it on writeansistring.  But as said this is all a slippery slope,
> > specially with unicode profileration ahead.  We are going writeunicodestring
> > sooner or later :-)
> 
> Exactly the reason for multiplexing it. It reduces proliferation.

Not really. You try to hide it, and only frustrate smartlinking in the
process. I would rather introduce a default parameter for the length size
(leaving it at 4, for legacy) and endianess.
 
> But I'm not exactly convinced that this kind of call is needed.

I've thought about it several times, but the trouble is that once you start
to think of it, the number gets out of hand so fast.



More information about the fpc-pascal mailing list