Re: Switch example in {} bracket page - change spaces..
| From: | Stefan Neufeind | Date: | Fri, 09 Apr 2004 08:56:50 +0000 |
| Subject: | Re: Switch example in {} bracket page - change spaces.. | ||
| References: | 1 | Groups: | php.pear.doc |
| Request: | Send a blank email to pear-doc+get-3209@lists.php.net to get a copy of this message | ||
On 9 Apr 2004 at 9:47, Alan Knowles wrote:
> Would anyone mind if I changed the switch statement on the control
> stuctures page: - it currently is there to illustrate the placement of
> {brackets} - however it also gives a poor example (IMHO) of indentation
> - we dont specify that case should be indented once from case - but it
> is a hell of alot clearer to read..
>
> eg. Change:
> ------------------CURRENT----------------------
> For switch statements:
> <programlisting role="php">
> switch (condition) {
> case 1:
> action1;
> break;
>
> case 2:
> action2;
> break;
>
> default:
> defaultaction;
> break;
>
> }
> </programlisting>
> </para>
> ------------------TO----------------------
> For switch statements:
> <programlisting role="php">
> switch (condition) {
> case 1:
> action1;
> break;
>
> case 2:
> action2;
> break;
>
> default:
> defaultaction;
> break;
>
> }
> </programlisting>
> </para>
Agreed from my side! Yeah, that makes more sense :-)
Stefan