Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:11641 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60672 invoked by uid 1010); 29 Jul 2004 23:08:37 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 60565 invoked from network); 29 Jul 2004 23:08:37 -0000 Received: from unknown (HELO theta.altoona-pa.com) (209.161.72.28) by pb1.pair.com with SMTP; 29 Jul 2004 23:08:37 -0000 Received: from IONZOFT-JEG (dpvc-207-68-114-163.alt.east.verizon.net [207.68.114.163]) by theta.altoona-pa.com (Postfix) with ESMTP id 9C9B21423E for ; Thu, 29 Jul 2004 19:08:36 -0400 (EDT) Date: Thu, 29 Jul 2004 19:08:42 -0400 X-Mailer: The Bat! (v2.11.02) Business Reply-To: Jason Garber Organization: IonZoft, Inc. X-Priority: 3 (Normal) Message-ID: <75910961.20040729190842@ionzoft.com> To: internals@lists.php.net In-Reply-To: <41099C4A.4080206@hristov.com> References: <20040729021337.73894.qmail@pb1.pair.com> <1091136355.490.4.camel@localhost> <1091139076.29517.12.camel@blobule.suds> <410991E1.6070000@hristov.com> <1091140927.29516.18.camel@blobule.suds> <41099925.4020700@hristov.com> <20040729225322.94418.qmail@pb1.pair.com> <41099C4A.4080206@hristov.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] GOTO operator From: jason@ionzoft.com (Jason Garber) Hello, I think we should add an INI option: php_newbie true|false ;) -- Best regards, Jason mailto:jason@ionzoft.com Thursday, July 29, 2004, 8:54:34 PM, you wrote: AH> Sara Golemon wrote: >>>do { >>> .....code... >>> if (something) break; >>> ...code.... >>>} while (0); >>>...cleanup code... >>> >> >> Are you suggesting a hack is better than the real thing? >> >> -Sara AH> The "hack" is working. The manual says : AH> " Advanced C users may be familiar with a different usage of the do..while loop, AH> to allow stopping execution in the middle of code blocks, by encapsulating them AH> with do..while (0), and using the break statement. The following code fragment AH> demonstrates this:" (a similar code follows) AH> " Don't worry if you don't understand this right away or at all. You can code scripts AH> and even powerful scripts without using this 'feature'. " AH> (the manual states that people can code powerful things without goto hack). AH> Sara, if you need to have the goto, you know how to implement it with do..while. AH> The average Joe may not need goto in some case but he will find that it simplifies AH> his job (but making code clumsy, something what he does not realize). AH> It is not because I don't like the power of goto, I would like not to be given in the AH> hands of the newbie. AH> andrey