[fpc-pascal] Pchar from constant string

Hairy Pixels genericptr at gmail.com
Thu Jun 29 16:18:44 CEST 2023


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 null terminated right?

var
  p: Pchar;
begin
  p := '123';
  writeln(p);


Regards,
	Ryan Joseph



More information about the fpc-pascal mailing list