Posted on 1998-07-21
These PChars are driving me nuts...they never give a result you'd expect...very unpredictable. I have a string array with about 20 character strings of 255 chars each. I simply want to loop thru them in a 'for' loop, and tack all these character strings together into 1 Pchar variable. Like this:
For x:=1 to 20 do
(hpchar and mainpchar are declared as PChar variables)
..I've tried every darn variation you can think of...with StrAlloc, StrLCat, StrCat...nothing works right.
I can't even initialize my 'mainpchar' variable right...if I initialize it to nil and then try to tack something on to it, it gives a EAccessViolation error. Very frustrating, these PChar's.
P.S: How come I never receive email notification when I question is answered? I always have the little box checked for it?