Difference between revisions of "Talk:PChar"
From Lazarus wiki
Jump to navigationJump to search (post replies to Bart‘s proposals) |
|||
Line 5: | Line 5: | ||
I would propose to change all occurences of "pChar" with "PChar" (and "pAnsiChar" with "PAnsiChar"). --[[User:Bart|Bart]] ([[User talk:Bart|talk]]) 12:24, 29 August 2021 (CEST) | I would propose to change all occurences of "pChar" with "PChar" (and "pAnsiChar" with "PAnsiChar"). --[[User:Bart|Bart]] ([[User talk:Bart|talk]]) 12:24, 29 August 2021 (CEST) | ||
+ | : @[[User:Bart|Bart]]: Yeah, it’s a personal preference of me to use <syntaxhighlight lang="pascal" inline>camelCase</syntaxhighlight> in identifiers, rather than <syntaxhighlight lang="pascal" inline>CamelCase</syntaxhighlight>. Lowercase being the default, the capitalization of the first letter doesn’t improve readability. ‑‑[[User:Kai Burghardt|Kai Burghardt]] ([[User talk:Kai Burghardt|talk]]) 14:25, 3 September 2021 (CEST) | ||
== Direct assignments == | == Direct assignments == | ||
Line 20: | Line 21: | ||
The example in [[User Changes 3.0#Literal storage memory has been made read-only|User Changes 3.0]] however crashes, as promised. --[[User:Bart|Bart]] ([[User talk:Bart|talk]]) 12:37, 29 August 2021 (CEST) | The example in [[User Changes 3.0#Literal storage memory has been made read-only|User Changes 3.0]] however crashes, as promised. --[[User:Bart|Bart]] ([[User talk:Bart|talk]]) 12:37, 29 August 2021 (CEST) | ||
+ | |||
+ | : @[[User:Bart|Bart]]: I ''dislike'' to show ''faulty'' code in a ''full-blown'' syntaxhighlight box, so [[Special: Diff/146649|I’ve added]] merely another sentence. Is that OK? ‑‑[[User:Kai Burghardt|Kai Burghardt]] ([[User talk:Kai Burghardt|talk]]) 14:25, 3 September 2021 (CEST) |
Revision as of 14:25, 3 September 2021
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)
- @Bart: Yeah, it’s a personal preference of me to use
camelCase
in identifiers, rather thanCamelCase
. Lowercase being the default, the capitalization of the first letter doesn’t improve readability. ‑‑Kai Burghardt (talk) 14:25, 3 September 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)
- @Bart: I dislike to show faulty code in a full-blown syntaxhighlight box, so I’ve added merely another sentence. Is that OK? ‑‑Kai Burghardt (talk) 14:25, 3 September 2021 (CEST)