The last section of any macro is the instructions block, whose purpose if to determine the values of sRESULT and bRESULT (and, optionally and rarely, n_RESULT).
➢Note that these 2 variables are initialized to '' and false, respectively, but if you do not set any value for them, then a warning message will be generated.
The instructions block begins with the begin keyword and ends with the end keyword, and is where most of the work of the macro happens.
// bResult will be true if the date of the token is a Sunday
bResult = (WeekdayOf(n_TokenDate) == 7)
// replace the macro token by the token without the *XX
sResult = '[' + IntToStr(n_TokenDayValue) + s_TokenRoot + ']'
See also: the code structure of a macro.
Topic 133500, last updated on 18-Apr-2020