View Single Post
  #8  
Old 09-03-2003, 07:45 PM
Tseng Tseng is offline
Sublime
Tseng's Avatar
Join Date: Jan 2003
Location: California
Posts: 0
Tseng is on a distinguished road
Re: Re: Re: Re: Brief explanations about some new features: (NEW SCRIPT ENGINE)

Quote:
Originally posted by Python523


the php name for it makes more sense I think, too bad graal doesn't use it

foreach(array as var)
for each element in array, it will set the single element as var, and continue on in the loop until there are no more elements to declare 'var' as
I like the Perl way better, it makes more sense, I think.

foreach $var (@somearray) {

Or, if you use strict (which is far superior to normal perl in terms of coding, because it forces you to code more efficiently, and even helps you locate bugs more quickly) and have not declared the variable yet:

foreach my $var (@somearray) {
__________________
Funny Things:
Quote:
Originally posted by Stefan
I didn't ban you, I only played a little bit with my RC.
-----
Reply With Quote