Reply To: CMac Documentation/Tutorial

Product Compare Forums Multi-Edit Suggestions CMac Documentation/Tutorial Reply To: CMac Documentation/Tutorial


I’m confused as to whether a macro with no parameters still requires a “()” in the definition or in the call. Example:

void mynoparam()
text(“hello world”);


void mynoparam
text(“hello world”);

and calling:

void test

So far CMACW seems to accept both. I assume I could infer this from a careful reading of “Macro elements”. It is a question I wondered, so perhaps other new programmers to CMACW will also ask the same question.

Another broader question is how and when to use old-style parameter passing vs. new more standard parameter passing. i.e. when should I use the lengthy:

void FindFile( str fn = parse_str(“/F=”, mparm_str) )

instead of the shorter

void FindFile( str fn)

Does it slow down Multi-Edit to use the longer version above?

There’s a pretty good description under “Macro command line parameter compatibility & default parameters”. This, or a reference to this, should probably be added to the “Caveats” section since it’s a digression from standard C.