INCLUDE_HOLIDAYS_LIST

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

INCLUDE_HOLIDAYS_LIST

Previous pageReturn to chapter overviewNext page

The purpose of this compiler directive is to specify that a macro will specifically use one of the aeiou-holidays.

 

Consider the example below, where a macro checks if, on a given date, the result of the [fo] and [fu] tokens are the same (note that the reference to each holidays list is made on a separate line).

INCLUDE_HOLIDAYS_LIST o
INCLUDE_HOLIDAYS_LIST u
var
   sOholidays sUholidays
begin
   sOholidays = EvalToken(n_TokenDate, '[fo]')
   sUholidays = EvalToken(n_TokenDate, '[fu]')
   bRESULT = (sOholidays == sUholidays)
end

If there are no tokens in the GridTemplate which refer to o-holidays and u-holidays then Q++Studio will not know that you need to specify o-holidays and u-holidays and will not be to issue a design-time message warning you that you have not defined them.

 

By using the INCLUDE_HOLIDAYS_LIST directive, you are telling Q++Studio that this macro will always require o-holidays and u-holidays, 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 holidays list was explicit (the above macro always uses o-holidays and u-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
   bRESULT = HolidayOfListOnDate(sHolList, n_TokenDate)
end

In those cases, you should not set the INCLUDE_HOLIDAYS_LIST 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 122500 updated on 11-Feb-2019.
Topic URL: https://www.qppstudio.net/webhelp_xv4/index.html?include_holidays_list.htm