Re: PHP Standard style of writing your code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, April 29, 2006 6:10 pm, Robert Cummings wrote:
> On Sat, 2006-04-29 at 10:56, Satyam wrote:
>>
>> A brace on its own line doesn't make sense to me.
>
> This begs the question... Where do you place the closing brace?

I think no matter which style one uses, the following statement is
correct:

The closing brace goes directly under the first character of the line
containing the opening brace.


THE REST OF THIS IS *WAY* OFF-TOPIC

Though, in Lisp, I would actually "collapse" closing parens on a
single line, and considered the closing parens "isomorphic" even
though the actual one closing any given paren would not be directly
under the opening line:

(let* ((x (+ xoffset 3))
       (y (+ yoffset 4))
      )
  (do* ((x1 x (+ x 1))
        (y1 y (+ y 1))
    (while ...
      (for ...
        ;;; body here
) ) ) ) ;;; just close all the damn things on one line...

4 lines in a row with one ')' each was just too much for me to deal
with...

I don't do that in PHP, but you don't generally have, like, 5 closing
braces in a row in PHP either.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux