How can i pass an array to a method as an argument?

336 views
asked Aug 9, 2017 in System Integration by patman
I want to pass an array to a method as an argument like: method(uint32 aArg1[]){ ... }. Is this possible or is there another effective solution?

1 Answer

0 votes
answered Aug 9, 2017 by Paul Banach

Hello,

such possibility is not supported actually. You can however pass an object containing the array in the method argument. Through the object the method can access and modify the array entries. In the simplest case you create a class containing just the array as member. Then you can create instances of the class and use them as a kind of data container with the array inside them.

Hope it helps you.

Best regards

Paul Banach

 

commented Aug 9, 2017 by patman
Thank you, this helps a lot!

Best regards

patman

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...