There are 2 ways for this to occur :
•The value of sRESULT is a macro token.
Consider the example below (note that the reference to each macro index is made on a separate line) :
sMacro = EvalToken(n_TokenDate, '[1*8_ddd]')
if sMacro <> ''
sRESULT = ''
sRESULT = '[1*9_ddd]'
If there are no tokens in the GridTemplate which refer to macro indices of 8 and 9 then Q++Studio will not know that you need to specify macro options for indices 8 and 9 and will not be able to issue a design-time message warning that you have not defined them. By using the INCLUDE_MACRO directive above, you are telling Q++Studio that this macro will always require Macro Options for indices 8 and 9, and therefore Q++Studio will be able to warn any user in that uses this macro.
The above example was one where the reference to a macro index was explicit (the above macro always uses indices 8 and 9). There are cases where the macro index used cannot be determined from the macro itself, because the macro index used is one of the input variables of the macro.
sRESULT = '[1*' + IntToStr(nMacroIndex) + '_ddd]'
Topic 110063, last updated on 01-Aug-2020