[fpc-devel] Method for write string into TStream
Marco van de Voort
marcov at stack.nl
Mon Jul 21 12:25:46 CEST 2014
In our previous episode, Michael Van Canneyt said:
> > Nothing stops you though from writing a class helper that adds a WriteString method to TStream.
> >
> > Yes, I can create also own descendant etc. ... but I am asking for general solution, which will be useful for all.
>
> Sure:
> We can simply add a boolean parameter 'WriteLength : Boolean = True' to the existing call.
> It keeps backwards compatibility, and allows you to write the strings with or without length.
(If so I would make it an enum selecting 0,2,4 bytes length or so)
More information about the fpc-devel
mailing list