[Freeciv-Dev] Re: PATCH: AI cleanup Version 2
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sun, Nov 25, 2001 at 08:41:56AM +0100, Raimar Falke wrote:
> Doing it at some part of the code based on your personal idea of how
> does it look nice is not ok. We all have personal idea of how does the
> code have to look but have to formalize this before we go to change
> this. I really hope we can get a discussion going which will produce
> such guidelines. Here are some questions for the start:
>
> * init vars
> int foo(struct city *punit)
> {
> int x=punit->x;
> }
> or
> int foo(struct city *punit)
> {
> int x;
>
> x=punit->x;
> }
Hehehe.
Neither.
int foo(struct city *punit)
{
int x = punit->x;
}
> * empty line after vars
> int x;
> x=3;
> or
> int x;
>
> x=3;
No line.
> * comments
> x=3; /* assign 3 to x */
> or
> /* assign 3 to x */
> x=3;
The second.
> * extra {} on iterates
No real preference.
--
Anthony J. Stuckey stuckey@xxxxxxxxxxxxxxxxx
"And they said work hard, and die suddenly, because it's fun."
-Robyn Hitchcock.
- [Freeciv-Dev] Re: Coding Guideline --- more variants, (continued)
- [Freeciv-Dev] Re: Coding Guideline --- more variants, Reinier Post, 2001/11/29
- [Freeciv-Dev] Re: Coding Guideline --- more variants, Raimar Falke, 2001/11/29
- [Freeciv-Dev] Re: Coding Guideline --- more variants, Reinier Post, 2001/11/29
- [Freeciv-Dev] Re: Coding Guideline --- more variants, Daniel L Speyer, 2001/11/28
- [Freeciv-Dev] Re: Coding Guideline --- more variants, Raahul Kumar, 2001/11/29
- [Freeciv-Dev] Re: PATCH: AI cleanup Version 2, Raimar Falke, 2001/11/25
- [Freeciv-Dev] Re: PATCH: AI cleanup Version 2, Raahul Kumar, 2001/11/26
- [Freeciv-Dev] Re: PATCH: AI cleanup Version 2, Raimar Falke, 2001/11/26
- [Freeciv-Dev] Re: PATCH: AI cleanup Version 2,
Tony Stuckey <=
- [Freeciv-Dev] Re: PATCH: AI cleanup Version 2, Raimar Falke, 2001/11/26
- [Freeciv-Dev] Re: PATCH: AI cleanup Version 2, Raahul Kumar, 2001/11/24
- [Freeciv-Dev] Re: PATCH: AI cleanup Version 2, Petr Baudis, 2001/11/24
- [Freeciv-Dev] Re: PATCH: AI cleanup Version 2, Raahul Kumar, 2001/11/24
- [Freeciv-Dev] Re: PATCH: AI cleanup Version 2, Raimar Falke, 2001/11/25
- [Freeciv-Dev] Clearing your backlog, Raahul Kumar, 2001/11/25
- [Freeciv-Dev] Re: Clearing your backlog, Raimar Falke, 2001/11/25
- [Freeciv-Dev] Re: Clearing your backlog, Raahul Kumar, 2001/11/25
- [Freeciv-Dev] Re: Clearing your backlog, Petr Baudis, 2001/11/25
- [Freeciv-Dev] Re: Clearing your backlog, Raimar Falke, 2001/11/26
|
|