Quick Poll: what is the correct indentation for ifdef?
- Posted by petelomax Mar 05, 2011
- 1877 views
I am currently updating Edita's Re-indent function to cope with ifdef statements.
I can either indent ifdef as if part of the code:
while 1 do ifdef WIN32 then msg = "windows" elsedef msg = "linux" end ifdef puts(1,msg) end while
or, and I think I prefer this way, to emphasize them as preprocessing statements:
while 1 do ifdef WIN32 then msg = "windows" elsedef msg = "linux" end ifdef puts(1,msg) end while
I suppose the real question I am asking is do I need an option, and if so what should the precise wording of that question be?
Pete