My Mathematica notebooks are often many pages long and, for clarity, I generally write only one expression on any line. In operation, such notebooks need to jump around within the full length of their code. In another language I'd use that language's feature analogous to Label/Goto structures. However, I've just encountered Mathematica's "Compound Expression" requirement which rejects multi-line Label/Goto code. Yet I've written many long compiled C-functions in Mathematica involving such structures and never encountered trouble. 1) Why is this "compound expression" thing necessary? Wrapping the entire multi-page code block in parentheses seems to work, so why couldn't the Mathematica parser recognize the entire notebook as a top-level "compound expression" In any case, the parentheses seem like an undesirable kluge. 2) How can I accomplish these intra-program jumps in a less awkward way?
CompoundExpression
has low precedence, so you do need to do things likefunc[x_] := (expr1; expr2; result)
$\endgroup$