Talk:PChar

From Lazarus wiki
Revision as of 11:37, 29 August 2021 by Bart (talk | contribs)
Jump to navigationJump to search

Spelling

I noticed that throughout this page the spelling "pChar" is used.
The type PChar is defined in the system unit (rtl/inc/systemh.inc), where the spelling is "PChar".
Also: this page is called "PChar".
I would propose to change all occurences of "pChar" with "PChar" (and "pAnsiChar" with "PAnsiChar"). --Bart (talk) 12:24, 29 August 2021 (CEST)


Direct assignments

The sample code is not very clear about what would make it crash. To me the phrasing suggsets that something like this should crash:

uses sysutils;
var
  p: pchar;
begin
  p := 'Hello';
  writeln(p);
  p := 'Hello World';
  writeln(p);
end.

The example in User Changes 3.0 however crashes, as promised. --Bart (talk) 12:37, 29 August 2021 (CEST)