nilsoncardososa Posted April 25, 2019 Share Posted April 25, 2019 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? Quote Link to comment Share on other sites More sharing options...
Aizatulin Posted April 25, 2019 Share Posted April 25, 2019 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 1 Quote Link to comment Share on other sites More sharing options...
nilsoncardososa Posted April 25, 2019 Author Share Posted April 25, 2019 Thank you very much for the explanation. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.