On 07/04/2025 08:01, Sven Barth via fpc-devel wrote:
Also it would be best to simply document as UTF8Copy working 1-based
because you can't detect from the callee-side whether it had been
enabled on the caller-side (especially if they're from different units).
Just an idea.
Maybe having 2 underlying string types for 0 and 1 based. Then it would
be possible to use overload.
Btw, "from the calling side", before I search the doc, what happens if
Unit1 // has 0 base strings
var foo: ansistring; //global
foo := 'abc';
unit2 // has 1 based strings
writeln(foo[1]); // follows 1 based or follows declaration 0 based?
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel