On Wed, 14 Mar 2018, Sven Schreiber wrote:
Am 14.03.2018 um 19:14 schrieb Allin Cottrell:
> On Wed, 14 Mar 2018, Sven Schreiber wrote:
>> eval max(deflist(1,2,3))
>> </hansl>
>
> Yes, should work according to the doc. This usage is an exception to the
> rule (recently enforced properly) that series can never be referred to by
> ID number when they appear as function arguments. But since the usage is
> stated to be OK I have re-enabled it.
BTW, this works:
eval max(20 * ones(3,1))
while this throws an error about wrong arg type:
eval max(20 * ones(3,2))
I tend to think that either both should work or both should fail. In the
former case the docs would need to reflect this.
I agree. This is a legacy thing -- accepting a column vector as if it
were a series. But since maxc and maxr are available for matrices
that's a bad idea. If we want max to work for matrices we should make
it return the global maximum value, and document that. I'm not sure I
want to make that change right now, however.
And to be clear in the first case, there are no series IDs 20, so it
could
not be possibly interpreted as such.
gretl wouldn't be tempted by that interpretation in any case: it's
only deflist(), not max(), that accepts numerical series IDs.
Allin