[Sidefx-houdini-list] array elements referring in VEX

Antoine Durr antoinedurr at gmail.com
Tue Aug 24 14:05:42 EDT 2010


I think I ran into something similar: you have to push items onto the  
array, you can't just set an array index to a value.  You can  
initialize the array with a bunch of values, but it won't extend the  
array automatically like other languages.

-- Antoine


On Aug 24, 2010, at 2:57 AM, Szymon Kapeniak wrote:

> hello,
> me or vex can't handle referencing array's element as user function's
> variable. Is it my mistake (hopefully), or in fact a current
> limitation (rsl seems to work this way)?
>
> <code>
>
> void userf(float a) {  a = 1.0; }
>
> surface test()
> {
>
>    float test[] = {0,0,0};
>    userf(test[0]);
>    printf("%f", test);
> }
>
> </code>
>
> if userf() is changed to accept w whole array, this of course works:
>
> void userf(float a[]) { a[0] = 1.0; }
>
>
> thanks for any comments!
> skk.
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list




More information about the Sidefx-houdini-list mailing list