---
title: "Sorting"
description: "`6d10s` or `6d10sa` - Roll six d10s and sort them in ascending order (the optional `a` makes the direction explicit)."
canonical: "https://www.questportal.com/documentation/AoQfJgvDm1/sorting"
section: "Documentation / Dice / Roll Formulas / Roll Modifiers"
source: "Quest Portal documentation"
version: 237
---

# Sorting

\`6d10s\` **or** \`6d10sa\` - Roll six d10s and sort them in ascending order (the optional \`a\` makes the direction explicit).

_Example:_ Roll: \`\[7, 2, 10, 5, 2, 8\]\` → Sorted Ascending: \`\[2, 2, 5, 7, 8, 10\]\` → Final Dice (Displayed): \`\[2, 2, 5, 7, 8, 10\]\`, Total: \`7 + 2 + 10 + 5 + 2 + 8 = 34\`

\`6d10sd\` - Roll six d10s and sort them in descending order

_Example:_ Roll: \`\[7, 2, 10, 5, 2, 8\]\` → Sorted Descending: \`\[10, 8, 7, 5, 2, 2\]\` → Final Dice (Displayed): \`\[10, 8, 7, 5, 2, 2\]\`, Total: \`7 + 2 + 10 + 5 + 2 + 8 = 34\`

---

Part of the [Quest Portal documentation](https://www.questportal.com/documentation.md) (Documentation / Dice / Roll Formulas / Roll Modifiers). HTML version: <https://www.questportal.com/documentation/AoQfJgvDm1/sorting>.
