Proper code
Hi Steve,
Let's say more compact then. Are loops a bad thing?
Per se, certainly not. However, non-looping methods will often be faster
than the looping equivalent.
And I assumed he had declared all of the variables in the code he
submitted.
The undeclared variable was only mentioned to alert the OP of the need and,
implicitly, to address the issue of compactness.
---
Regards,
Norman
|