Custom Variadic Vex Functions
2245
5
1
-
- traden1976
- Member
- 22 posts
- Joined: 11月 2016
- Offline
I'm looking at a way of creating a custom function in Vex any number of trailing params.
The closest reference I could find is here:
https://www.sidefx.com/docs/hdk/_h_d_k__vex_op.html [
www.sidefx.com]
but I don't understand it.
eg.
void myFunc(int arr_i[]; string arr_s; string ...extra_params) {
s@debug = extra_params[0];
}
here's a go lang example:
Go Variadic [
gobyexample.com]
Is this possible? If so can someone give me a simple example?
Thanks in advance!
Edited by traden1976 - 2020年2月13日 07:50:59
-
- Ommlet
- Member
- 3 posts
- Joined: 2月 2015
- Offline
Hi traden1976!
Could you please elaborate a little bit, what you try to implement?
-
- traden1976
- Member
- 22 posts
- Joined: 11月 2016
- Offline
Hi Ommlet, I want to pass in an arbitrary amount of arrays to be populated. But it's more for the sake of curiosity VS being stuck on a problem.
Just wondering if it's actually possible.
thanks!
-
- kahuna031
- Member
- 897 posts
- Joined: 7月 2018
- Offline
This way of declaring functions isn't supported. You should give it a string array instead.
Edited by kahuna031 - 2020年2月13日 13:40:22
B.Henriksson, DICE
-
- traden1976
- Member
- 22 posts
- Joined: 11月 2016
- Offline
Thanks for researching and replying guys! I'll look at different approaches.