V G wrote: > On Sat, Oct 6, 2012 at 6:12 AM, V G wrote: >=20 >> On Sat, Oct 6, 2012 at 2:16 AM, Tamas Rudnai wro= te: >> >>> I am not arguing here, just saying that the type is the pointer or '*' = in >>> C. The mark 'int' is needed by the pointer arithmetic and to casting th= e >>> memory selected by the pointer. That's why it makes perfect sense to me= to >>> use the version B 'int *a, *b, *c;' notation. >>> >>> By the way, we always can create our own type, so maybe what OP is look= ing >>> for is something like: >>> >>> typedef int* pInt; >>> pInt d,e,f; >>> >>> >> I'm not really "looking for" a new type. I'm just the type of guy who >> needs to settle on a standard before I write 100 000 lines of code based= on >> it. It helps me sleep at night knowing that my asterisks are aligned >> correctly, you know? >> >> In either case, I'm sold on the type A (asterisk near the type) style, >> since boost (http://boost.org) with 18 million+ lines of code is using >> it. So I'm not the only one who likes it. As I said, it helps me sleep a= t >> night. >> >=20 > Edit: My word count tool says ~2 million lines of code in the boost sourc= e > tree. I misinterpreted the 18 million from this site: > http://www.ohloh.net/p/boost FWIW, Boost is a large library with a number of different styles. The style is mostly consistent within a given library, but changes between libraries. For example, a part of it uses the older "const int", a part of it uses the newer "int const". I've never paid specific attention to the pointer asterisk and reference ampersand placement, but if I had to bet, I'd bet that they vary between libraries. Also FWIW, I prefer form B, but there are people on my team who prefer form A. (I write C++ for a living.) Another consideration is the dereferencing usage. When you have a pointer to int and you refer to its int value, you generally write something like int a; int *p; *p =3D a; The notion that "*p" is an int is part of pretty much every style, even the ones that write "int* p;". I've yet to see a style that would write this like int a; int* p; * p =3D a; But then, this isn't a binding argument. Form A is quite viable and often used, and so is form B. Gerhard --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .