On 2023-06-30 11:11, Michael Van Canneyt via fpc-pascal wrote:
On Fri, 30 Jun 2023, Hairy Pixels via fpc-pascal wrote:
On Jun 30, 2023, at 9:03 AM, Hairy Pixels
wrote:
That's why that worked. Hmm with short strings the null terminator
could be truncated when copying right? Something to l
On Fri, 30 Jun 2023, Michael Van Canneyt via fpc-pascal wrote:
On Fri, 30 Jun 2023, Hairy Pixels via fpc-pascal wrote:
On Jun 30, 2023, at 9:03 AM, Hairy Pixels wrote:
That's why that worked. Hmm with short strings the null terminator could
be truncated when copying right? Something
On Fri, 30 Jun 2023, Hairy Pixels via fpc-pascal wrote:
On Jun 30, 2023, at 9:03 AM, Hairy Pixels wrote:
That's why that worked. Hmm with short strings the null terminator could be
truncated when copying right? Something to look out for.
this is what I meant about truncation. S is no
> On Jun 30, 2023, at 9:03 AM, Hairy Pixels wrote:
>
> That's why that worked. Hmm with short strings the null terminator could be
> truncated when copying right? Something to look out for.
this is what I meant about truncation. S is no longer null terminated and now
the pchar will fail whe
> On Jun 29, 2023, at 9:31 PM, Michael Van Canneyt via fpc-pascal
> 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"
> .Le
On 2023-06-29 16:22, Mattias Gaertner via fpc-pascal wrote:
On Thu, 29 Jun 2023 21:18:44 +0700
Hairy Pixels via fpc-pascal wrote:
What is really happening in this snippet? I think it must be
implicitly taking the address of the constant string but is it also
adding the null terminator automati
On Thu, 29 Jun 2023, Mattias Gaertner via fpc-pascal wrote:
On Thu, 29 Jun 2023 21:18:44 +0700
Hairy Pixels via fpc-pascal wrote:
What is really happening in this snippet? I think it must be
implicitly taking the address of the constant string but is it also
adding the null terminator auto
On Thu, 29 Jun 2023 21:18:44 +0700
Hairy Pixels via fpc-pascal wrote:
> What is really happening in this snippet? I think it must be
> implicitly taking the address of the constant string but is it also
> adding the null terminator automatically? The string prints with
> writeln so it must be nul