I have here a problem which I do not understand :
procedure TMain.THREAD_SYNC(
AProgressBar: TProgressBar;
ARemoteData: array of RemoteDATA;
ALocalData : array of LocalDATA;
Number : integer;
AInfo : TEdit);
The following procedure works perfectly if I assign to it "smaller arrays" like this
THREAD_SYNC(Remote,Local,0,Edit1)
When I try to assign a larger array to it with over 30.000 records then I get a Stack Overflow error, so I tried and googled ... and I found something about using const so I changed my procedure to:
procedure TMain.THREAD_SYNC(
AProgressBar: TProgressBar;
ARemoteData: array of RemoteDATA;
const ALocalData : array of LocalDATA;
Number : integer;
AInfo : TEdit);
And now it works, my problem is I don't understand why?
What is the difference without const?