> On Jun 29, 2023, at 9:31 PM, Michael Van Canneyt via fpc-pascal
> <fpc-pascal@lists.freepascal.org> wrote:
>
> Yes, it is:
>
> ---
> _$PROGRAM$_Ld1:
> # [4] p := '123';
> .ascii "123\000"
> .Le11:
> ---
>
> Just as it is for a shortstring and ansistring:
> ---
> # [6] s:='456';
> .ascii "\003456\000"
> .Le12:
> .size _$PROGRAM$_Ld2, .Le12 - _$PROGRAM$_Ld2
That's why that worked. Hmm with short strings the null terminator could be
truncated when copying right? Something to look out for.
Regards,
Ryan Joseph
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal