cancel
Showing results for 
Search instead for 
Did you mean: 

Passing an array variable/values to procedure (delphi script)

Highlighted
Occasional Contributor

Passing an array variable/values to procedure (delphi script)

Hello

 

I have a procedure which has input parameter OleVariant.

For example procedure doSomething( p:OleVariant);

 

How is the easiest way to initialize an array and pass to the procedure.


I've tried to initialize dynamically the variable located at Variable List (object)

as one-dimensional array CreateVariantArray(0, 2), and afterward to declare values.

 

It doesn't work. I got error type mismatch at line: 'CreateVariantArray(0, 2)'

Also it couldn't automatically generate array on call doSomething ([1,2,3,4,5])

 

Any ideas?

 

Thank you.

1 REPLY 1
Highlighted
Community Hero

Re: Passing an array variable/values to procedure (delphi script)

What are you trying to test with this?  Perhaps we can find you an easier way to do it.

New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

Changing options from outside of TestComplete

Participate!

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!
Top Kudoed Authors