B
BartC
I'm trying out these macros to save on typing and errors** :
#define else } el##se {
That seems to work: 'else' is converted to '} else {'. Somehow the ## stops
the new 'else' from being recursively processed.
But:
#define elsif } el##se if
if converted to '} } else { if'. That new 'else' is this time processed one
extra time.
What's the way to make it do what I want? (I don't like using capitals; I
reserve those for debug code.)
(** A month or so of using C, and I'm starting to suffer from RSI pain
again! Partly from all the extra typing needed, partly from sorting out
problems from mismatching/missing braces, case labels and everything else.
For a supposedly terse language, there's a lot of typing involved!)
#define else } el##se {
That seems to work: 'else' is converted to '} else {'. Somehow the ## stops
the new 'else' from being recursively processed.
But:
#define elsif } el##se if
if converted to '} } else { if'. That new 'else' is this time processed one
extra time.
What's the way to make it do what I want? (I don't like using capitals; I
reserve those for debug code.)
(** A month or so of using C, and I'm starting to suffer from RSI pain
again! Partly from all the extra typing needed, partly from sorting out
problems from mismatching/missing braces, case labels and everything else.
For a supposedly terse language, there's a lot of typing involved!)