On Tue, 12 May 2015, Sven Schreiber wrote:
I've started working with arrays, and here are two small issues
or questions.
1. The help for 'genr' says: "In the appropriate context, series, scalar,
matrix, string and bundle are synonyms for this command."
It seems this statement has to be amended with the array correspondences,
'matrices', 'strings' (and 'bundles'?), as in:
"matrices mymarr[3] = zeros(1,1)".
Yes, true, it we want to retain doc for "genr" as such.
2. If 'checks' is an array of matrices, is this supposed to
work? (It doesn't
in the current snapshot.):
"print checks[3]"
No, it's not supposed to work. It wouldn't work for printing a matrix
element either -- "print" is simple-minded (unlike printf).
3. Then there is another thing related to bundles, see this example:
<hansl>
bundle bcheck = null
matrix bcheck.mymat = ones(1,1)
bcheck.mymat ~= zeros(1,1)
</hansl>
which gives me a "~= not implemented for this type" error. So a matrix inside
a bundle somehow isn't a first-class matrix it seems. (The workaround
"bcheck.mymat = bcheck.mymat ~ zeros(1,1)" works.)
Yes, it would be nice to have that working but it's not something that
"comes for free"; it will require some new coding.
4. Also bundle-related is a very weird behavior where gretl
doesn't
acknowledge the bundle it just created:
<hansl>
stop = 10
loop i=1..stop --quiet
bundle bSim = null
bSim.p = 2
endloop
</hansl>
tells me "bSim: no such object"!!??
Just a common or garden bug. The client (GUI or CLI) was confusing
the syntax "bSim.p" with "object.action" as it applies to, e.g.,
"model1.show". That's now fixed in CVS and snapshots.
Allin