Op donderdag 27-03-2008 om 11:35 uur [tijdzone +0100], schreef [EMAIL PROTECTED]: > Hi, > > I seek help to clarify a very basic use of TStringList. > > Let A and B be TStringLists. What is the difference between: > > A:=B; > > and > > A.Assign(B); ?
That's more a basic(?) question about Pascal. When you do A:=B; then A has become equal to B. That means for example that if you add an new string to B, this new string will also be in A. After all A and B are the same. Note that if A contained a TStringList that you can not acces it anymore through A, but it's still present in memory. When you do A.Assign(B); then all strings in A are cleared and afterwards all strings in B are copied to A. Further all relevant properties of B are also set to A. Note that in this case, A should already contain a TStringList, and if you add values to B after the assignment, those strings will not appear in B. Joost _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal