s_TokenRoot

Navigation:  Appendices > Macro Language > System Variables >

s_TokenRoot

Previous pageReturn to chapter overviewNext page

This is the root of the Macro token, once the LanguageTag, the DayValue, the "*" and the Macro sequence ID have been stripped.

 

For example in the following Macro token,

 

[b3*1ShadeHol]

 

The value of s_TokenRoot would be 'ShadeHol'.

 

s_TokenRoot is extremely useful if you wish to apply the same Macro Actions to different tokens. For example, suppose you wanted to shade the day and weekday of any date which contained a holiday. The GridTemplate would contain the tokens [1*1d], [1*1Dddd] and [1*1Mmmm], for example.

This is almost the same as the tokens one would use if there were no Macros (and indeed this shows how easily an existing grid can be "fitted" with Macros).

 

Using the following code :

 

sRESULT = SetCurHolidaysList('a')

sRESULT = EvalToken(n_TokenDate,'[Fa]')

bRESULT = sRESULT <> ''

sRESULT = EvalToken(n_TokenDate, s_TokenRoot)

 

and replacing the text by sRESULT when bRESULT is true or false, you see that the Macro token will be replaced by a different "normal" token depending on the value of s_TokenRoot.


Topic 105120 updated on 07-Mar-2002.
Topic URL: http://www.qppstudio.net/webhelp/index.html?s_tokenroot.htm