Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

28 Working with macros > 28.1 Defining and invoking macros > 28.1.1 Defining macros > 28.1.1.4 Managing line breaks in macro definitions


28.1.1.4 Managing line breaks in macro definitions

A macro definition does not have to be all on one line; Mif2Go ignores line breaks when processing macros. However, any implicit line breaks in the definition are retained in output when a macro is expanded.

To remove an implicit line break so it does not appear in the output, end the line in question with a backslash “\”.

To remove all implicit line breaks from macros upon expansion:

[Macros]

; OmitMacroReturns = No (default)

;  or Yes (omit macro linebreaks in output)

OmitMacroReturns=Yes

Be aware that omitting all line breaks means that the code generated from each expanded macro—even JavaScript code—ends up all on one line in the output. Few browsers can handle the very long lines that might result.

If you specify OmitMacroReturns=Yes, but still need line breaks in some macros to keep line lengths reasonable in output, you can insert a C-style line terminator “\n” in the definition, even in the middle of a line, wherever you want an explicit line break in the output.



28 Working with macros > 28.1 Defining and invoking macros > 28.1.1 Defining macros > 28.1.1.4 Managing line breaks in macro definitions