Document widestring internal
Original Reporter info from Mantis: marco @marcoonthegit
-
Reporter name: Marco van de Voort
Original Reporter info from Mantis: marco @marcoonthegit
- Reporter name: Marco van de Voort
Description:
Real widestring (so on Windows) apparently has the length in the structure in bytes, rather than chars. Setlength and length() do work on words though. Even though it is an internal detail, it might be worthwhile to document or at least hint on this, since it is a Windows internal type, and one of the key reasons of widestring<>unicodestring (the other being using COM compatible allocation, that also could be mentioned in the docs)
Delphi's docs do too.
See also related report.
Steps to reproduce:
var s : widestring;
setlength(s,5)';
writeln(pdword(@s[1])[-1]);
will write 10.
Mantis conversion info:
- Mantis ID: 35444
- Version: 3.3.1
- Fixed in version: 3.3.1
- Fixed in revision: 1602 (#cefff3a9).
- Target version: 3.2.0