octave-maintainers
[Top][All Lists]
Advanced

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

convention for declaring pointers?


From: Rik
Subject: convention for declaring pointers?
Date: Sun, 23 Apr 2017 22:15:27 -0700

jwe,

Is there a convention for whether to cuddle the '*' for pointers with the
variable name, variable type, or neither?  I noticed in
liboctave/array/idx-vector.h declarations such as the following

idx_range_rep * r = dynamic_cast<idx_range_rep *> (rep);

I started to change this to

idx_range_rep *r = ...

but then I realized that maybe the extra space is good.  It is consistent
with the rest of Octave coding conventions which tends to emphasize extra
whitespace for readability.  The space between the name of a function and
the opening parenthesis is an example of this openness.

--Rik



reply via email to

[Prev in Thread] Current Thread [Next in Thread]