I have been using -for- for a very long time now, and like it's
capabilities. However, I know it has its limits, and doesn't with a very
complicated sequence of commands.
I recently read Nick Cox' wonderful "Speaking Stata" column, and decided to
try and use -foreach- -forval-, instead of -for-. I have run into problems
with -forval-.
When my numlist is of the form "1 0", "0 1", "1", -forval- complains about
"invalid syntax". It works with "0/1" or "1(-1)0". With "1/0" it doesn't
complain, but displays no results.
-for-, on the other hand, works with all of the above.
the -forvalues- syntax does not really accept a "numlist", rather a "range"
which is more narrowly defined in the online help for -forvalues-.