Am 27.01.2017 um 16:18 schrieb Allin Cottrell:
One more comment on this. If you write something along the lines of
any
of the following
transp(m) = <some matrix>
...
work like that, but hansl is a plain old declarative language and
"no
can do". You can't do this in any C-like language, nor in any scripting
language that I'm familiar with.
A valid "lvalue" must be the identifier of an existing object (possibly
followed by a member-of specification), or (in a language like hansl
which does not insist on pre-declaration) a name which is valid as
identifier for a newly-created object.
Not sure if this is entirely correct even for hansl:
The following is documented and works as expected (as you know):
<hansl>
matrix m = I(2)
m[diag] = {3, 3}
print m
</hansl>
In principle one could argue that transp(m) and m[diag] are not that
different, in that they juggle around (some of) the elements of the
left-hand side matrix.
I'm certainly not arguing that the other thing should work, I agree
hansl is totally OK in that respect.
cheers,
sven