Hi,
I'm seeing odd behaviour so I'm check my string types are used correctly. Now I'm totally confused.
https://www.freepascal.org/docs-html/rtl/sysutils/strpcopy.htmlStrPCopy
Copy an ansistring to a null-terminated string.
Declaration
Source position: syspchh.inc line 39
function StrPCopy(
Dest: PChar;
const Source: string
):PChar; overload;
function StrPCopy(
Dest: PWideChar;
const Source: UnicodeString
):PWideChar; overload;
However if I cntl-click on StrPcopy in my code where it cals it , it opens sysunih.inc actually declares this:
function StrPCopy(Dest: PWideChar; const Source: UnicodeString): PWideChar; overload;
There is no second definition. So where is that second definition ? Is the hover hint mistaken or is this the save declaration which is used in compiling my code.
One of those declarations ( which used to covert a pascal string[255] type to Pchar declares the input argument as:
What the hell does that mean ? Well , it depends ....
So does that stil work as before or has it been redefined ? What is the point in a declaration which is ambiguous?
These genderfluid strings are nightmare at the best of times but if the documentation is not consistent there is no hope of controlling it.