fpc/docs/stringex/ex2.pp
2005-02-14 17:13:06 +00:00

18 lines
270 B
ObjectPascal

Program Example2;
Uses strings;
{ Program to demonstrate the StrPCopy function. }
Const S = 'This is a normal string.';
Var P : Pchar;
begin
p:=StrAlloc (length(S)+1);
if StrPCopy (P,S)<>P then
Writeln ('This is impossible !!')
else
writeln (P);
end.