Jump to content
Sign in to follow this  
nilsoncardososa

Vex help

Recommended Posts

Help
I am studying Array and I did not understand this:
Because I get these values in foreach in the "var int pt".
I just do not understand what those values are, let alone what happens. Can anyone explain?

help.jpg

Share this post


Link to post
Share on other sites

Hi,

the foreach loops over all values in the i[]@pts array. Your attributes i@i and i@pt are integer attributes (not arrays), so each attribute value gets overwritten for each turn in the loop. At the end these attributes will have the value of the last run of the loop. If you use arrays for example, you will get all values from the loop.

for_each_pts.hipnc

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×