Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

array parameter

Status
Not open for further replies.

lespaul

Programmer
Feb 4, 2002
7,083
US
I searched and found some information on passing arrays, but not what I'm looking for.

In my procedure I create a variant array

Code:
ProcessList := VarArrayCreate([0, (personcount - 1), 0, 8], varOleStr);

I then fill this array with information and pass it to excel to print a specific report. I now need to pass this array to another procedure in order to create a text file, something like:

Code:
procedure CreateTextTransfer(arrProcessList : variant);
begin
//create my file
end;


CreateTextTransfer(ProcessList);

Will something like this work? Will I be able to access the array elements in the CreateTextTransfer procedure if I set it up like this?

Thanks!

Leslie
 
actually after reviewing the process I found that I don't need to pass this array! Thanks for looking.

Leslie
 
Ok, I figured out what I need to do. In my excel process, I create a comma separated list of the unique ID of the people who are getting paid (I remove the people with no pay which is why the process list won't work, it still has people with no pay). After I create the comma separated list in Excel, I transfer that back to Delphi:

Code:
PaidJurorList := TStringList.Create;
  PaidJurorList.CommaText := excelapp.Worksheets.Item['Criteria'].Range['jurorlist'];

In order to create the text file I need to loop through the string list and for each jurorid (the unique field) get the information from the ProcessList array where the jurorid's match.

Is this possible?

Thanks again.

Leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top