octave-maintainers
[Top][All Lists]
Advanced

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

Re: astyle configuration


From: John W. Eaton
Subject: Re: astyle configuration
Date: Mon, 13 Jan 2020 23:26:18 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 1/13/20 11:15 PM, Kai Torben Ohlhus wrote:

I think we should in general change to this layout in such cases:

   octave_value retval = (! some_variable.isempty ())
                         ? true
                         : false;

Then astyle also does not break anything with your configuration and for
me it is even more clearer, where to look for the condition?true:false
parts of that operator.

If you write it like this

  octave_value retval = (! some_variable.is_empty ()
                         ? do_something (with, some, arguments)
                         : do_something_else (with, other, arguments));

then Emacs CC mode will do the right thing with indenting the ?: to line up inside the outer parens.

jwe




reply via email to

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