[Gretl-devel] matrix error
Sven Schreiber
svetosch at gmx.net
Mon Mar 3 10:05:25 EST 2008
Allin Cottrell schrieb:
> On Sat, 1 Mar 2008, Sven Schreiber wrote:
>
>> The following produces an error on a post-1.7.2-build:
>>
>> matrix m1 = zeros(1,5)
>> matrix m2 = ones(1,5)
>> mymat = m1 | m2
>>
>> whereas this version works:
>>
>> matrix m1 = zeros(1,5)
>> matrix m2 = ones(1,5)
>> matrix mymat = m1 | m2
>>
>> I know the second variant (with explicit matrix declaration) is
>> cleaner, but shouldn't the first one also work?
>
> This is the old business of what "|" means: logical OR, or
> vertical matrix concatenation?
>
> Maybe for 1.7.4 it's time to insist on "||" for OR.
>
You mean 1.7.3 or 1.7.4? Maybe a big version number is better to
indicate backwards-incompatible changes? (Although gretl's versioning
scheme doesn't work along those lines I guess.)
I can live with the explicit matrix declaration and don't want to push
any potentially code-breaking changes. But if the change is applied, I
think it would be a good idea to make the error message about "|" in
non-matrix contexts informative, for example "Concatenation '|' only
valid with matrices (the logical OR operator is now '||')".
cheers,
sven
More information about the Gretl-devel
mailing list