INCLUDE_NAMEDAYS_SET

Navigation:  Appendices > Macro Language > Code Structure > Compiler Directives >

INCLUDE_NAMEDAYS_SET

Previous pageReturn to chapter overviewNext page

The purpose of this directive is to tell Q++ that a macro will specifically use one of the aeiou-Namedays.

 

Consider the example below where a macro checks if on a given date, there is a moving holiday of list e, and displays the a-Namedays in either case :

 

INCLUDE_NAMEDAYS_SET a

INCLUDE_HOLIDAYS_LIST e

var

begin

 bRESULT = HolidayOfListOnDate('e', n_TokenDate)

 sRESULT = '[:nd_a]'

end

 

If there are no tokens in the GridTemplate which refer to a-Namedays and e-holidays then Q++ will not know that you need to specify a-saints and e-holidays and will not be able to issue a message warning you that you have not defined them. By using the INCLUDE_NAMEDAYS_SET and INCLUDE_HOLIDAYS_LIST directive above, you are telling Q++ that this macro will always require a-Namedays and e-holidays, and therefore Q++ will be able to warn any user in that uses this macro.

 

The above example was one where the reference to a Holidays List was explicit (the above macro always uses a-Namedays and e-holidays). There are cases where the holidays list used cannot be determined from the macro itself, because the holidays list used is one of the input variables of the macro.

 

input

 sHolList

var

begin

 sRESULT = '[:nd_' + sHolList + ']'

end

 

In those cases, you should not set the INCLUDE_NAMEDAYS_SET directive in the macro code, as in the first example, but rather as part of the Macros Options of the Script that uses this macro.

 


Topic 172960 updated on 10-Aug-2002.
Topic URL: http://www.qppstudio.net/webhelp/index.html?include_namedays_set.htm