diff options
| author | 2021-02-07 04:29:32 +0100 | |
|---|---|---|
| committer | 2021-02-07 04:29:32 +0100 | |
| commit | 97ad992e98ba4c0ef18f0d3f6768a7f4a9ecae05 (patch) | |
| tree | baa936d79975b71a50a17186f8bb0300ab90541a /HelpMe.md | |
| parent | 47b73a17808b8993f966de4f2795164b599fe77d (diff) | |
| download | OneRoll-97ad992e98ba4c0ef18f0d3f6768a7f4a9ecae05.tar.gz OneRoll-97ad992e98ba4c0ef18f0d3f6768a7f4a9ecae05.zip | |
Update documentation
Diffstat (limited to 'HelpMe.md')
| -rw-r--r-- | HelpMe.md | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -25,6 +25,7 @@ * [Unique](#unique) * [All The same](#allsame) * [Value list](#Value-list) + * [Switch/Case](#Switch-case) * [Comment (\#)](#comment-) * [Functions](#Functions) * [Managing the output](#the-output) @@ -559,6 +560,27 @@ Then, the final output will be: `{7,3}` and `{6,4}` are group, and `[2]` is left aside. +### Switch case (S) + +Switch case operator allows you to transform number value into text. +Its goal is to make that easier than using several if. As you may expect, its syntax is close to if. + +``` +1d100S[<50]{"Low"}[>=50]{"Low"} +``` + +You may also add a default option + +``` +1d4S[=1]{"Low"}[=2]{"small"}[=3]{"medium"}{"big"} +``` + +Exclusive mode: +This mode is enabled when a `^` is following the `S`. +``` +1d100S^[<25]{"Low"}[<50]{"small"}[<75]{"medium"}[>=75]{"big"} +``` + ### Comment (\#) ``` |