You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
message = parse error near line 48 of file /usr/share/octave/packages/tablicious-0.4.2/+tblish/+internal/mycombvec.m
syntax error
>>> out = [out; [repmat (a(i), [size (rest_combs,1) 1]) rest_combs]];
^
[...]
Spaces () separate elements inside brackets ([ ]). So, that line is interpreted as out = [out; [repmat, (a(i), [size, (rest_combs,1), 1]), rest_combs]];. Combining comma-separated lists with parenthesis is not supported (and is probably not what you wanted).
That line should probably be the following instead:
out = [out; [repmat(a(i), [size(rest_combs,1), 1]), rest_combs]];
My notes:
Those extra spaces were a mistake. Probably introduced recently when I did this "Convert to GNU Octave code style" change, where I added a space at function calls to be "foo (...)" instead of "foo()", but didn't catch by manual inspection the places where that wasn't correct.
Probably introduced in v0.4.0.
This affected a few other functions, too. And in some cases, they were single-arg function calls, so no commas in the "(...)", which I think means they weren't syntax errors, but were incorrectly calling the function with zero args, and then concatenating its return value with the "(...)" expression that was supposed to be the function args, maybe raising a run-time error or just producing incorrect results. That's worse.
I've checked in a hopeful fix in 151d2ec and will be merging it soon and rolling a corrective patch release. Hopefully get some more unit test coverage in there too.
Recording this bug as its own ticket for reference, even though it's almost (I think) fixed.
The text was updated successfully, but these errors were encountered:
As reported by @mmuetzel in gnu-octave/packages#401 (my paraphrasing):
One of the doctests is failing:
Spaces (
) separate elements inside brackets (
[ ]
). So, that line is interpreted as out = [out; [repmat, (a(i), [size, (rest_combs,1), 1]), rest_combs]];. Combining comma-separated lists with parenthesis is not supported (and is probably not what you wanted).That line should probably be the following instead:
My notes:
Those extra spaces were a mistake. Probably introduced recently when I did this "Convert to GNU Octave code style" change, where I added a space at function calls to be "foo (...)" instead of "foo()", but didn't catch by manual inspection the places where that wasn't correct.
Probably introduced in v0.4.0.
This affected a few other functions, too. And in some cases, they were single-arg function calls, so no commas in the "(...)", which I think means they weren't syntax errors, but were incorrectly calling the function with zero args, and then concatenating its return value with the "(...)" expression that was supposed to be the function args, maybe raising a run-time error or just producing incorrect results. That's worse.
I've checked in a hopeful fix in 151d2ec and will be merging it soon and rolling a corrective patch release. Hopefully get some more unit test coverage in there too.
Recording this bug as its own ticket for reference, even though it's almost (I think) fixed.
The text was updated successfully, but these errors were encountered: