Code Style

Johan Granberg lijat.meREM at OVEgmail.com
Fri Jun 15 13:40:27 PDT 2007


Brad Anderson wrote:
>> Do you indent with tabs or
>> spaces (or both?) What size tabs/how many spaces do you use?
> 
> I'm hoping all of this is configurable, including "turn tabs to spaces"
> 

I rather have a function that turn spaces into tabs :P

joke aside, my codeing convention is as follows.

Hard limit of 80 characters per line.

Tabbs are used for indentation.

No alignment of code.

class Foo:Bar
{
        int baz(int a,int b)
        {
                switch(a)
                {
                        case 1:
                                return b;
                        case 2:
                                break;
                }
                return 0;
        }
}

Hope this helps.



More information about the Digitalmars-d mailing list