Don Guinn wrote:
> (0e1j1) would only insert one fill instead of two.
Correct, as I said:
> Of course this is just a start and will have
> multiple issues, but I hope it gets the idea across
The main issue is that 12e2j3 is *not* a quarternion, and J's constant
notation for numeric scalars isn't capable of carrying 3 independent values
unambiguously, and even where it can, you run into precision problems.
For this particular issue:
> Wouldn't this limit the number of copies to a maximum of 9?
Nope, for example:
12e2j3 expand 'a'
..aaaaaaaaaaaa...
The limitation is that your number of copies can't be a positive power of
10. We could tweak the notation to address this (e.g. by using a decimal
point to carry more information). I'll play with this and if I come up with
a better solution I'll post it.
-Dan
PS: The fact that we can't express everything we want compactly with J's
numeric scalar constant notation doesn't mean we can't write a useful expand
utility; but its left rank will be 2, not 1 (taking vectors where the
current expand takes scalars). This is actually fine for most uses, which
are calculated at runtime and not typed by a human at design time. Any
constant-notation-abusing utility I write will just be a cover to this
left-rank-2 verb.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm