mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-01 21:30:35 +02:00
* The test was wrong, the values to insert into the collections are pstrings, not pchar.
This commit is contained in:
parent
cc68571e4d
commit
82b456f4f8
@ -17,10 +17,9 @@ begin
|
||||
begin
|
||||
Str(Random(100),S);
|
||||
S:='String with value '+S;
|
||||
P:=StrAlloc(Length(S)+1);
|
||||
C^.Insert(StrPCopy(P,S));
|
||||
C^.Insert(NewStr(S));
|
||||
end;
|
||||
For I:=0 to 99 do
|
||||
Writeln (I:2,': ',PChar(C^.At(i)));
|
||||
Writeln (I:2,': ',PString(C^.At(i))^ );
|
||||
Dispose(C,Done);
|
||||
end.
|
Loading…
Reference in New Issue
Block a user