octave-maintainers
[Top][All Lists]
Advanced

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

Re: formatting ?: operator


From: Mike Miller
Subject: Re: formatting ?: operator
Date: Tue, 25 Apr 2017 14:54:56 -0700
User-agent: NeoMutt/20170113 (1.7.2)

On Tue, Apr 25, 2017 at 17:51:06 -0400, John W. Eaton wrote:
> On 04/25/2017 05:44 PM, Rik wrote:
> 
> > A quick absolute value function also looks unnecessarily long when
> > written in the new style
> > 
> > abs_x = x < 0
> >         ? -x
> >         : x;
> 
> I was only talking about where to break the expression when it won't all fit
> on one line.  If it will fit on one line, then I wouldn't split it.

That was my understanding also, line break before the '?' if and only if
the entire ternary expression doesn't fit in 80 columns.

-- 
mike



reply via email to

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