[Gretl-devel] Re: glitches with bundles and systems: bug or not supported?

2021-01-08 Thread Allin Cottrell
On Fri, 8 Jan 2021, Sven Schreiber wrote: hammering the release candidate on some special system cases some more: Consider this first example: open denmark bundle b list endo = diff(deflist(LRM, IBO)) list rhs1 = deflist(const, LRY) list rhs2 = deflist(const, IBO(-1)) lists rhses =

[Gretl-devel] glitches with bundles and systems: bug or not supported?

2021-01-08 Thread Sven Schreiber
Hi, hammering the release candidate on some special system cases some more: Consider this first example: open denmark bundle b list endo = diff(deflist(LRM, IBO)) list rhs1 = deflist(const, LRY) list rhs2 = deflist(const, IBO(-1)) lists rhses = defarray(rhs1, rhs2) list b.endo = endo lists

[Gretl-devel] Re: foreach-loop over arrays

2021-01-08 Thread Artur Tarassow
Am 08.01.21 um 17:16 schrieb Allin Cottrell: On Fri, 8 Jan 2021, Artur Tarassow wrote: Am 08.01.21 um 15:12 schrieb Allin Cottrell: "loop foreach" is intended for iterating across strings, and allowing iteration over bundle keys and arrays of strings is a special case of that. But in

[Gretl-devel] Re: foreach-loop over arrays

2021-01-08 Thread Allin Cottrell
On Fri, 8 Jan 2021, Sven Schreiber wrote: Am 08.01.2021 um 17:16 schrieb Allin Cottrell: On Fri, 8 Jan 2021, Artur Tarassow wrote: 1) Using a foreach loop looks very natural (at least) to me when iterating over bundles and matrices -- even though it may be redundant [...] OK, I take your

[Gretl-devel] Re: foreach-loop over arrays

2021-01-08 Thread Sven Schreiber
Am 08.01.2021 um 17:16 schrieb Allin Cottrell: On Fri, 8 Jan 2021, Artur Tarassow wrote: 1) Using a foreach loop looks very natural (at least) to me when iterating over bundles and matrices -- even though it may be redundant [...] OK, I take your point. Now in git   loop foreach i is

[Gretl-devel] Re: foreach-loop over arrays

2021-01-08 Thread Allin Cottrell
On Fri, 8 Jan 2021, Artur Tarassow wrote: Am 08.01.21 um 15:12 schrieb Allin Cottrell: "loop foreach" is intended for iterating across strings, and allowing iteration over bundle keys and arrays of strings is a special case of that. But in general "foreach" for arrays is redundant since

[Gretl-devel] Re: foreach-loop over arrays

2021-01-08 Thread Artur Tarassow
Am 08.01.21 um 15:12 schrieb Allin Cottrell: On Fri, 8 Jan 2021, Riccardo (Jack) Lucchetti wrote: On Fri, 8 Jan 2021, Artur Tarassow wrote: Hi, I am not sure the following behavior of bundles and matrices data types is intended: While a foreach loop iterates over all items for bundles

[Gretl-devel] Re: foreach-loop over arrays

2021-01-08 Thread Allin Cottrell
On Fri, 8 Jan 2021, Riccardo (Jack) Lucchetti wrote: On Fri, 8 Jan 2021, Artur Tarassow wrote: Hi, I am not sure the following behavior of bundles and matrices data types is intended: While a foreach loop iterates over all items for bundles (items = keys) and string arrays this is _not_

[Gretl-devel] Re: foreach-loop over arrays

2021-01-08 Thread atecon
Am 08.01.2021 09:54 schrieb Riccardo (Jack) Lucchetti: On Fri, 8 Jan 2021, Artur Tarassow wrote: Hi, I am not sure the following behavior of bundles and matrices data types is intended: While a foreach loop iterates over all items for bundles (items = keys) and string arrays this is

[Gretl-devel] Re: foreach-loop over arrays

2021-01-08 Thread Riccardo (Jack) Lucchetti
On Fri, 8 Jan 2021, Artur Tarassow wrote: Hi, I am not sure the following behavior of bundles and matrices data types is intended: While a foreach loop iterates over all items for bundles (items = keys) and string arrays this is _not_ the case for matrices and bundle arrays aka bundles. I

[Gretl-devel] foreach-loop over arrays

2021-01-08 Thread Artur Tarassow
Hi, I am not sure the following behavior of bundles and matrices data types is intended: While a foreach loop iterates over all items for bundles (items = keys) and string arrays this is _not_ the case for matrices and bundle arrays aka bundles. I think it's quite natural that it matrices and