Diary Generation Options - Miscellaneous

Navigation:  Scripts > Diary Generation > Diary Generation Options >

Diary Generation Options - Miscellaneous

Previous pageReturn to chapter overviewNext page

The following options of the Miscellaneous tab of the Diary Generation Options may sometimes need to be changed, to get around a Too many levels of token iteration or Too many levels of token recursion generation-stopping messages.

 

Max. Iterations

When Q++Studio evaluates a token, it keeps track of the number of levels of iterations used in converting each individual token. Whenever that number reaches the value of the Maximum Iterations property, the processing of the token is stopped and a run-time error message is generated.

 

Most tokens get converted with an iteration level of 0 (zero). The token comes in and is replaced by text that does not contain tokens. For example, [a1Dddd] may get converted to Monday.

A token such as [a1:dmmmm] may be converted, depending on the language, into [Mmmm] [d][.d] which would cause the token conversion to be called 3 more times to evaluate these 3 tokens, hence a recursion level of 3.

Even recursive macro tokens that generate complete months and format different elements of each day differently, usually reach an iteration level of about 300 only.

 

As can be seen from the above examples, the default value for this property, 1000, should be more than enough in all cases. If necessary, this value can be increased to 10000, but most of the time you will not need to change the value of this property.

Max. Recursion

When Q++Studio evaluates a token it keeps track of the number of levels of recursion used. Whenever that number reaches the value of the Maximum Recursion property, the processing of the token is stopped and a run-time error message is generated.

 

Most tokens get converted with a recursion level of 0 (zero). The token comes in and is replaced by text that does not contain tokens. For example, [a1Dddd] may get converted to Monday.

However, sometimes, a conversion functions must evaluate included tokens immediately because the original token's date cannot be used for these included tokens. This is the case for Duration Tokens and MiniCalendar Tokens. This is usually a sign that you are replacing a token by the same token, either in the Multi-Holidays surrounding text or the Moon Options. In these cases the recursion level of the conversion function calling itself can increase.

 

The default value for this property, 50, should be more than enough in all cases. If necessary, this value can be increased to 500, but it is not recommended as it can cause a stack overflow, and most of the time you will not need to change the value of this property.

 

Most of the other options on the Miscellaneous tab of the Diary Generation Options are meant to be used only at the suggestion of Q++Studio Technical Support.


Topic 179395 updated on 19-Feb-2019.
Topic URL: https://www.qppstudio.net/webhelp_xe3/index.html?misc.htm