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
Bart via fpc-devel schrieb am So., 6. Apr.
2025, 23:19:
> Hi,
>
> Is this a known issue?
> ===
> program z;
>
> {$longstrings on}
> {$zerobasedstrings on}
>
> var
> S, T: string;
> begin
> S := 'ABC';
> write('S[0]= "',S[0],'"');
> if (S[0] <> 'A') then writeln(', FAIL: expected:
Hi,
Is this a known issue?
===
program z;
{$longstrings on}
{$zerobasedstrings on}
var
S, T: string;
begin
S := 'ABC';
write('S[0]= "',S[0],'"');
if (S[0] <> 'A') then writeln(', FAIL: expected: A') else writeln(' [Ok]');
write('S[1]= "',S[1],'"');
if (S[1] <> 'B') th