Re: Re: PHP 4.0 Bug #7367 Updated: for loop

From: Date: Fri, 20 Oct 2000 14:46:40 +0000
Subject: Re: Re: PHP 4.0 Bug #7367 Updated: for loop
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-35662@lists.php.net to get a copy of this message
Dominique Stender wrote: > > Yeah, its wrong syntax but ";" has no semantic functionality right before a > ")" or "}" and maybe some more block-ending signs so (IMHO) its a problem > of > the syntax checker being too strict. Hi Dominique, you cannot omit the ";" just before ")" or "}". You can omit it before a "?>" or if you have only one line between your "{" "}" pair. For for loops you have to write exactly two ";" between the "(" ")" pair. "for (;;)" is a legal construct but "for (;;;)" is not legal. -Egon > ----- Original Message ----- > From: "Bug Database" <php-dev@lists.php.net> > To: <d.stender@regiocom-aachen.de> > Sent: Friday, October 20, 2000 4:09 PM > Subject: PHP 4.0 Bug #7367 Updated: for loop > > > ID: 7367 > > Updated by: derick > > Reported By: d.stender@regiocom-aachen.de > > Status: Closed > > Bug Type: Scripting Engine problem > > Assigned To: > > Comments: > > > > Of course it doesn't. This is not a bug, that syntax is just wrong. > > > > Previous Comments: > > -------------------------------------------------------------------------- > - > > > > [2000-10-20 09:58:33] d.stender@regiocom-aachen.de > > Hello everyone, > > > > > > > > for ($i = 0; $i < $max; $i++ ) { > > > > echo $i > > > > } > > > > > > > > works while > > > > > > > > for ($i = 0; $i < $max; $i++; ) { > > > > echo $i > > > > } > > > > > > > > does not. Note the added ; in the for definition. > > > > > > > > greetings, > > > > > > > > Dominique Stender > > > > > > > > -------------------------------------------------------------------------- > - > > > > > > Full Bug description available at: > > http://bugs.php.net/?id=7367 > > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > For additional commands, e-mail: php-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- SIX Offene Systeme GmbH · Stuttgart - Berlin - New York Sielminger Straße 63 · D-70771 Leinfelden-Echterdingen Fon +49 711 9909164 · Fax +49 711 9909199 http://www.six.de Besuchen Sie uns auf der Buchmesse in Frankfurt, Halle 4.0, Stand D 1117 und auf der Systems in München, Halle C2, 126

« previous php.dev (#35662) next »