octave-patch-tracker
[Top][All Lists]
Advanced

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

[Octave-patch-tracker] [patch #8839] maint: utils.cc: invert if/else/err


From: Rik
Subject: [Octave-patch-tracker] [patch #8839] maint: utils.cc: invert if/else/error instances.
Date: Wed, 23 Dec 2015 17:30:16 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)

Update of patch #8839 (project octave):

                  Status:                    None => Done                   
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #1:

@Doug: Looks good.  I made two small changes.  The first was to "distribute"
the ! operator.  Instead of 
.

if (! nr == 1 && ! nc == 1)


I wrote


if (nr != 1 && nc != 1)


The second change was to add a newline after the call to error().  This helps
with the visuals.  When all the code is squished together it is natural to
think that the flow of execution proceeds one statement after another.  But,
by opening a break one has the idea that one block of code may be executed and
that the second may or may not be.  Instead of 


if (! nr == 1 && ! nc == 1)
  error ("%s (A): use %s (size (A)) instead", warn_for, warn_for);
Array<double> v = a.vector_value ();


I wrote


if (! nr == 1 && ! nc == 1)
  error ("%s (A): use %s (size (A)) instead", warn_for, warn_for);

Array<double> v = a.vector_value ();


I checked in your patch here
http://hg.savannah.gnu.org/hgweb/octave/rev/7026da637999.

I think you have the hang of it now and can start pumping out the patches.

Best wishes,
Rik


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8839>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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