Attempting to assign array parameters globally
bytes32[] params;
(params[0], params[1]) = ("p1", "p2");
results in ParserError: Function, variable, struct or modifier declaration expected.
When moved into a function there is no longer a parser error; but, when the function is called the following error occurs Error: VM Exception while processing transaction: invalid opcode
Please advice.
address owner = msg.sender;probably counts as "executable code" but is allowed outside of a function. I think it's more accurate to say that the only things allowed at the contract level are variable declarations (including initialization) and functions. – user19510 Jul 10 '18 at 00:15