Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » is there U++ coding style reference?
Re: is there U++ coding style reference? [message #27789 is a reply to message #27788] Tue, 03 August 2010 13:39 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

I totally agree with mrjt and his reasoning.Morover, I am using 5 levels of color coded backgrounds (with quite sharp colors), that gives much better idea about blocks than looking forbrackets.

As I said before, the only exception to have bracket on separate line is the first bracket in function definition. I don't like that too much as well, but there I can see the reason - if you set the function name apart from the rest of text, it makes it easier to find the function when "scanning" through long file.

But I would never do this with if, while, etc. Actually I often make the block on the same line, if it contains just a short code:
if(condition){int a = 213;}
for(int i = 0; i < 123; i++){abs += i;}
But that is my personal style, definitely not official U++ Smile

Honza
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: using Ctrl::Add; required for templates / overloaded virtual functions
Next Topic: dll instead of exe
Goto Forum:
  


Current Time: Wed Jun 05 23:07:37 CEST 2024

Total time taken to generate the page: 0.01152 seconds