[ABE.pm] 'for' statement Q

Faber J. Fedor faber at linuxnj.com
Fri Aug 15 11:33:56 PDT 2008


On 15/08/08 14:15 -0400, Ricardo SIGNES wrote:
> * "Faber J. Fedor" <faber at linuxnj.com> [2008-08-15T13:56:16]
> > Interesting.  That means I can have an incrementor and a test condition
> > in my foreachs! I'm going to have to play with that...
> 
> Sure... because foreach and for are the same.

Right, but because of this little experiment, I now have a different way
to explain all of this.  Instead of saying "there is a for loop and a
foreach loop", I now say "foreach is a synonym of a for and there are
three forms/variations of a for loop".  Pedantic?  Yes, but I have to be as a
teacher.

> I'm not sure what you would've expected.

I wasn't sure either.  That's why I did it. :-)


-- 
 
Regards,
 
Faber Fedor
President
Linux New Jersey, Inc.
908-320-0357
800-706-0701

http://www.linuxnj.com





More information about the ABE-pm mailing list