Forum Discussion
Altera_Forum
Honored Contributor
12 years agoAs far as I know, it is almost always discouraged to write a while loop, if it is possible to make it a for loop, in any language.
This is because it is easy to make a mistake with a while loop, so that it never ends, software nor hardware will like this. Ofcourse you could also write a neverending forloop, but a forloop always has at least some exit statement. So wether it compiles or not, if you can write it as a for loop, just do.