mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-12 12:50:31 +02:00
19 lines
313 B
ObjectPascal
19 lines
313 B
ObjectPascal
Program Example4;
|
|
|
|
Uses strings;
|
|
|
|
{ Program to demonstrate the StrCopy function. }
|
|
|
|
Const P : PCHar = 'This is a PCHAR string.';
|
|
|
|
var PP : PChar;
|
|
|
|
begin
|
|
PP:=StrAlloc(Strlen(P)+1);
|
|
STrCopy (PP,P);
|
|
If StrComp (PP,P)<>0 then
|
|
Writeln ('Oh-oh problems...')
|
|
else
|
|
Writeln ('All is well : PP=',PP);
|
|
end.
|