<

I was mulling over an example that behaved differently when cut and pasted in a Document (2dmath input) and a Worksheet (1dmath maple input). The example was this,

M := Matrix([a]);
N := Matrix([b]);
(M.N)[1,1];
(M.N+N)[1, 1];

The last line of that, in Maple 11.00, produces the product of the list [1,1] and the addition M.N+N, instead of indexing into that sum's Matrix result as it does with 1dmath input.

Is that a bug? Clearly there are two different parsing rules being applied.

I came to a somewhat unsettling thought: what is the set of Examples from the help-pages which, when copied and pasted line-for-line into 2dmath input, would not work properly? I do mean that with each line copied separately, since the "Copy Examples" command to transfer all the Examples will insert 1dmath input. Quite frequently I copy and paste just the input of some smaller, individual example from a help-page, and don't want the entire Examples section.

It didn't take long to find a problematic example. From the help-page for mod, I pasted in this to a 2dmath input line in a Document:

`mod` := mods;

I received the error message, "Error, invalid mod". Then I converted the input from 2dmath to 1dmath input, in-place, using the context-menu. And then it worked.

It also didn't work, in 2dmath input, if I simply typed that line, just as I saw it on the help-page.

So, are these different parsing behaviours all distinct bugs, or things that I have to know and keep in mind?

If there are some valid and intended differences between the parsing rules for the various input modes, then how would I know which if any help-page examples would work and which would not, if typed in directly?

acer


Please Wait...