Q: Is it possible to enter a macro over multiple lines?
Eg. something like:
$macro myMacro if (a = 1) then do something; else do something else; endif;
23.1 and later allow macro continuation characters. This is described in the release notes of 23.1 and is featured in the testlib model macro02.
While you can do a lot with macros, the intent was to have a compact representation of (recursively defined) expressions. Your example uses it for multiple statements. Be aware of macro expansion and compile time statements.