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

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

[Octave-bug-tracker] [bug #48038] fill errors/warnings


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #48038] fill errors/warnings
Date: Thu, 2 Jun 2016 10:52:39 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0

Follow-up Comment #11, bug #48038 (project octave):

Thank you, Rik, for pushing the patch.

However, with your last change, the example from comment #7 fails with an
error.
That syntax is un-documented in Matlab. But any combination of
property-value-pairs with structs seem to work. Thus, the number of "surplus
arguments" can be odd or even.

I guess that is a trade-off between allowing Matlab-compatible un-documented
syntax and Octave erroring too late.

OTOH, an error is thrown *after* a patch is drawn with the following example
anyway:

x = 1:10;
y1 = rand(1,10);
y2 = 2+rand(1,10);
props.LineStyle = ':';
fill ([x fliplr(x)], [y1 y2], 'r', props, {});


So why not consistently throw the error after drawing the patch and remove the
check for an even number of "surplus arguments" completely?
Can the "unwind protect" be used to undo the changes if an error occured? If
yes, should such a construct be avoided for some reason?
What do you think would be best?

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48038>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

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