Am 13.05.2013 20:03, schrieb Allin Cottrell:
On Mon, 13 May 2013, Sven Schreiber wrote:
>
> A related, though not identical, bug:
>
> <hansl>
> clear
> matrix m = ones(2,2)
>
> bundle b
> b.m1 = m
>
> check = b.m1[1,1]
> </hansl>
>
> doesn't work (i.e. directly indexing/selecting parts of matrix in a bundle).
I see your point, but I'm not sure I'd describe it as a "bug".
As presently constituted, a bundle is not, and doesn't act
much like, an array. The general idea is that a bundle is
simply a container (literally, a hash table), and you have to
pull an object out of a bundle before you can do anything with
it.
Fair enough -- I had a similar thought and therefore also tried:
'(b.m1)[1,1]', that is I tried to do the "pulling out" with the pair of
parentheses.
I tend to agree that it's better to be conservative here and not try to
be too smart syntax-wise, although it comes at the cost of a couple more
trivial lines of hansl code.
thanks,
sven