Quick Poll: what is the correct indentation for ifdef?

new topic     » topic index » view thread      » older message » newer message

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

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu