GMcConville
Programmer
I have been using Delphi for a few years now and one thing I have never been able to do is create a string which is actually part of another string
EG
String1 := 'This is my program';
SetLength(String2, 2);
Addr(String2) := Addr(String1 + 5);
Memo1.Lines.Add(String2);
So therefor String2 equals 'is' from String1. Not a copy of it but directly from that String, so if String1 changes then String2 will always equal the 5th and 6th Character of String1. Any ideas anyone?
Thanks
Grant
EG
String1 := 'This is my program';
SetLength(String2, 2);
Addr(String2) := Addr(String1 + 5);
Memo1.Lines.Add(String2);
So therefor String2 equals 'is' from String1. Not a copy of it but directly from that String, so if String1 changes then String2 will always equal the 5th and 6th Character of String1. Any ideas anyone?
Thanks
Grant