Re: Little question about switch CS
| From: | Daniel Convissor | Date: | Fri, 14 Jan 2005 01:26:45 +0000 |
| Subject: | Re: Little question about switch CS | ||
| References: | 1 2 | Groups: | php.pear.qa |
| Request: | Send a blank email to pear-qa+get-2324@lists.php.net to get a copy of this message | ||
On Thu, Jan 13, 2005 at 05:19:54PM +0000, Helgi ?ormar wrote:
The switch statement section is definitely the most common "let's revise
the standard" thread. There was one back in early '04, if I remember
correctly.
I prefer the following for both short and long:
switch (condition) {
case 1:
action1;
break;
case 2:
action2;
break;
default:
defaultaction;
}
Similar to the existing standard, but with the cases indented, just like
every other bracketed thing in the standard.
Thanks,
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409