str = EvalToken(nDate,sToken)
sCurMonthName = EvalToken(Today(),'[Mmmm]')
This function does not limit you to the evaluation of a single token. The following example would also work as expected :
sCurMonthName = EvalToken(Today(),'The date is [Mmmm] [d]')
There are thus 2 main reasons to make the effort of evaluating a token yourself, within a macro, using the EvalToken function :
1. You need the token to be evaluated with a different DayValue or LanguageTag. But in that case the token passed to sRESULT can be modified, using s_TokenRoot, to have the desired DayValue and/or LanguageTag.
sRESULT = '[' + sNewLanguageTag ->
+ IntToStr(nNewDayValue) ->
+ s_TokenRoot + ']'
Precautions to use when using this function :
•Make sure you include the token's braces (actually, if there are no braces in sToken, then Q++ will automatically add braces to the fron and back).