helpfile wrote:MacroExpandedCount allows to get the expanded count (number of time the macro has been expanded/called). It can be useful to generate unique identifiers in the same macro for every expansion (like label, procedure name etc.).
MacroExpandedCounts returns the number of times the macro is replaced in the source. This has nothing to do with how much the piece of code is executed.
Little John wrote: Wed May 08, 2024 3:28 am
That's correct, because macro expansion happens at compile time, while the for/next loop is executed at runtime.
In this case, the documentation needs to be changed.
Little John wrote: Wed May 08, 2024 3:28 am
That's correct, because macro expansion happens at compile time, while the for/next loop is executed at runtime.
In this case, the documentation needs to be changed.
How would you change it? It already seems to be clear with this preface in the section on macros:
Macros are a very powerful feature, mainly useful for advanced programmers. A macro is a placeholder for some code (one keyword, one line or even many lines), which will be directly inserted in the source code at the place where a macro is used.