Does Octave support arguments blocks?

I’d like to use this good looking package:

And I get some weird syntax errors with it, for instance:

error: parse error near line 20 of file .../../ValueAndError.m

  syntax error

>>>                 Value (:,1) double = double.empty(0,1)
                                     ^

And if I remove that type check, I get:

error: parse error near line 59 of file .../../ValueAndError.m

  syntax error

>>>                 leftSideObj   ValueAndError {mustBeValueAndError}
                                              ^

Are these incompatibilities documented?

Octave doesn’t support the arguments block yet.
See also this feature request on the bug tracker:
GNU Octave - Bugs: bug #59405, Feature request: new arguments… [Savannah]

The info below is from comments for bug report #59405:

I pushed the following changeset to allow Octave to parse arguments blocks

http://hg.savannah.gnu.org/hgweb/octave/rev/c19f8cbe0fd5

Note that this change only implements parsing so the syntax is accepted. Octave still does not perform any evaluation of arguments blocks. Code that relies on arguments blocks to provide default values, perform type conversion or do anything else that is useful will likely produce incorrect results after this change.

Please see the commit message for more details.

I could also use some feedback on this topic that is related to the new arguments blocks (if you’d like to comment on this topic, please do so in the other topic, not here):

2 Likes