octave-maintainers
[Top][All Lists]
Advanced

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

Re: __plt__.m redundancies


From: Rik
Subject: Re: __plt__.m redundancies
Date: Thu, 27 Jun 2013 12:19:03 -0700

On 06/27/2013 12:05 PM, Daniel J Sebald wrote:
>
> Oh, I see what you are saying now.  I was looking at the routine
> __plt2__.m.  This is in the private directory, and I think JWE has not
> been validating the options at the lower level routines in such cases,
> just assuming they are properly called.  The line
>
>     else
>       error ("__plt2ss__: arguments must be scalars");
>     endif
>
> will only produce an error if a developer hasn't programmed things
> correctly.  But in all likelihood if a developer doesn't provide scalars,
> there will be some other type of error from within the core.
>
> You're proposing removing
>
>     if (isscalar (x)&&  isscalar (y))
>
> and similar checks, right?
>
Yes, the tests for scalar, vector, and matrix don't need to be repeated. 
In addition, I'd strike the tests which check the number of arguments and
do a print_usage().  There is isn't any documentation for these leaf
functions to print and all of these functions are deeply internal and have
had their arguments previously checked.  The leaf functions should really
be code that actually calculates or does something.

--Rik
> Dan
>
>
>



reply via email to

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