< Dice | RollerConfig
Difference between revisions of "Dice/RollerConfig/MaxRecursionDepth"
From DiceRoller Documentation
(Created page with "{{APIdoc|RollerConfig.MaxRecursionDepth Property}} Gets or sets how deeply nested a dice expression can get. {{ns}} == Syntax == <syntaxhighlight lang="C#"> public ushort Ma...") |
m (→Remarks) |
||
Line 15: | Line 15: | ||
== Remarks == | == Remarks == | ||
− | The default value for MaxRecursionDepth is 20. It is recommended to not set this too high, but it should be high enough to handle complex rolls. For example, the dice expression {{c|floor((1d20rr<5dl1 + 2) * 1.5)}} has a depth of 5 ( | + | The default value for MaxRecursionDepth is 20. It is recommended to not set this too high, but it should be high enough to handle complex rolls. For example, the dice expression {{c|floor((1d20rr<5dl1 + 2) * 1.5)}} has a depth of 5 (see below for a representation of the abstract syntax tree). The topmost operation counts as depth 0 rather than depth 1 for the purposes of MaxRecusionDepth. |
Revision as of 18:31, 10 April 2017
Gets or sets how deeply nested a dice expression can get.
- Namespace: Dice
- Assembly: DiceRoller (in DiceRoller.dll)
Syntax
public ushort MaxRecursionDepth { get; set; }
Property Value
Type: System.UInt16
The maximum amount of nesting that can happen in dice expressions. Exceeding this limit will result in a DiceException being thrown with DiceErrorCode.RecursionDepthExceeded.
Remarks
The default value for MaxRecursionDepth is 20. It is recommended to not set this too high, but it should be high enough to handle complex rolls. For example, the dice expression floor((1d20rr<5dl1 + 2) * 1.5)
has a depth of 5 (see below for a representation of the abstract syntax tree). The topmost operation counts as depth 0 rather than depth 1 for the purposes of MaxRecusionDepth.