octave-maintainers
[Top][All Lists]
Advanced

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

Re: 3.2 status report


From: Jaroslav Hajek
Subject: Re: 3.2 status report
Date: Wed, 6 Aug 2008 20:05:54 +0200

On Wed, Aug 6, 2008 at 6:05 PM, John W. Eaton <address@hidden> wrote:
> On  6-Aug-2008, Jaroslav Hajek wrote:
>
> | The reason for this change is that Matlab's choice makes the structure
> | visually useless: if you dump it on the screen, the relevant options
> | are hindered by a flood of empty fields which you're completely not
> | interested in (and sometimes they don't even make sense). I really
> | don't understand why the Matlab people made this choice.
> | Thus, there is no simple way to inspect what options a structure
> | actually contains.
>
> Other than the clutter, I'm not sure I understand what real problem
> this change is trying to solve.  Can you give an example?

There's no other problem, just the cluttering. But I think it is a real problem.

>
> | -  elseif (rem (nargs, 2) && isstruct (varargin{1}))
> | -    ## Set values in old from name/value pairs.
> | -    retval = optimset (varargin{1}, struct (varargin{2:end}));
> | -  elseif (rem (nargs, 2) == 0)
> | -    ## Create struct.  Default values are replaced by those specified by
> | -    ## name/value pairs.
> | -    retval = optimset (optimset (), struct (varargin{:}));
> |    else
> | -    print_usage ();
> | +    if (rem (nargs, 2) && isstruct (varargin{1}))
> | +      ## Set values in old from name/value pairs.
> | +      s1 = varargin{1}; op = varargin(2:end);
> | +    elseif (rem (nargs, 2) == 0)
> | +      ## Create struct.  Default values are replaced by those specified by
> | +      ## name/value pairs.
> | +      s1 = struct (); op = varargin(:);
> | +    else
> | +      print_usage ();
> | +    endif
> |    endif
>
> Why change this from
>
>  elseif
>  elseif
>  else
>  endif
>
> to
>
>  else
>    if
>    elseif
>    else
>    endif
>  endif
>
> ?
>
> jwe
>

Huh. No reason. I suspect that I have initially aimed for some more
complicated change and then reconsidered and restored things manually,
but apparently not quite correctly. I'll fix this, thanks for the
notification.

regards

-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz


reply via email to

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