You can't do this:
return {int MyPipSizestring, string SosName};
However, you can pass variables by reference and modify them directly from within the function.
You also might want to look into the use of structures if you want multi-type arrays.
selnomeria: Is anything like this, possible?
| You can not return complex types. |
// xxxx MyArrayContainter; void OnInit(){ MyArrayContainter = MyFunc(); int a= MyArrayContainter.MyPipSize; string b= MyArrayContainter.SosName; } xxxx MyFunc(){ MyPipSize = XYZ; SosName = XYZ; return {int MyPipSizestring, string SosName}; } | struct Values{ int MyPipSize; string SosName; } Values MyArrayContainter; void OnInit(){ MyFunc(MyArrayContainter); int a= MyArrayContainter.MyPipSize; string b= MyArrayContainter.SosName; } void MyFunc(Values& container){ container.MyPipSize = XYZ; container.SosName = XYZ; return; } |
whroeder1:
You can not return complex types. | |
Wow, thanks!
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
This topic is different from my previous topic...
for example, i want to have a function, which should set a bunch of different variables/values. Then I want to call that function , like this:
Is anything like this, possible?