[Overview][Constants][Types][Classes][Procedures and functions][Variables] |
Assigns an ansistring to a null-terminated string.
Source position: sysstrh.inc line 64
procedure AssignStr( |
var P: PString; |
const S: String |
); |
AssignStrallocates Sto P. The old value of Pis disposed of.
This function is provided for Delphi compatibility only. AnsiStringsare managed on the heap and should be preferred to the mechanism of dynamically allocated strings.
None.
|
Allocate a new ansistring on the heap. |
|
|
Append one ansistring to another. |
|
|
Dispose an ansistring from the heap. |
Program Example63; { This program demonstrates the AssignStr function } {$H+} Uses sysutils; Var P : PString; Begin P:=NewStr('A first AnsiString'); Writeln ('Before: P = "',P^,'"'); AssignStr(P,'A Second ansistring'); Writeln ('After : P = "',P^,'"'); DisposeStr(P); End.