[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

Re: [XaraXtreme-dev] Patch for spelling and white space consistency

--On 30 March 2006 16:32 -0800 Carl Worth <cworth@xxxxxxxxxx> wrote:

It would be nice if the syntax for variable declarations allowed this
style to be used consistently this way. But, unfortunately, this style
can lead to mistakes such as:

	TCHAR* ptr1, ptr2;

Which has the appearance of declaring two symmetric pointers to TCHAR
but in face declares one pointer to TCHAR and one TCHAR.

This is why I greatly prefer a style which would have the correct
version of the code be:

	TCHAR *ptr1, *ptr2;

I'd tend to agree (and it works better with "indent" too - I almost have an
"indent" string that makes it work), and so it seems do lots of writers of
Camelot code. Doxygen also uses the latter style. The counter argument is
"well you should have put the two variable declarations on two different
lines anyway according to the style guide".