Warning: The macro ‘{name}’ is defined in the body of method ‘{method}’, which only the methods compiled after it see
A method uses a macro that another method’s body #defines. IRIS compiles a class’s methods
into one routine in name order, and a #define holds for the rest of the routine. In a
method that sorts before the defining one, the macro is undefined, and IRIS refuses to
compile the line (MPP5610: Referenced macro not defined). Renaming either method can
reverse that order. Define the macro in an include file the class Includes.
IRIS compiles the example.
Class Demo.MacroFromMethodBody
{
ClassMethod Greet() As %String
{
#define GREETING "Hello"
Quit $$$GREETING
}
ClassMethod Shout() As %String
{
Quit $$$GREETING_"!" //! A3904
}
}