Go to the FreeLists Home Page Home Signup Help Login
 



[haiku-development] || [Date Prev] [03-2008 Date Index] [Date Next] || [Thread Prev] [03-2008 Thread Index] [Thread Next]

[haiku-development] Re: coding style

  • From: "François Revol" <revol@xxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 03 Mar 2008 15:11:43 +0100 CET
> Gabriele Biffi <mlist@xxxxxxxxx> wrote:
> > Axel Dörfler wrote:
> > > * use "char* variable" instead of "char *variable" in C++ code
> > I think "char *variable" is better, because if you write "char*
> > variable1, variable2" can be confusing (variable2 isn't a pointer).
>
> That's easy to solve: just don't use that anymore :-)
> The reason for putting the '*' to the type is that it is actually
> part
> of the type, not of the variable name; I would even consider the
> outcome of "char* a, b" a bug in the language grammar.
>

Not if you read it as "the type of *a (dereference of a) is char",
which is consistent with b. It's like I always understood it.

François.





[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.