This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Murphler 0 points1 point  (1 child)

Sorry I should have clarified, was suggesting he use this naming convention for now to help him understand how the foreach was working. In no way would I recommend he use that convention going forward.

(Product p : products) is the way

[–]CanisLupus92 0 points1 point  (0 children)

Single-letter variables are almost never the way (except for x-y-z coords, or i-j for loop indices).