_Docs/
Get StartedModulesPlatformDeployCookbookChangelogReference
_Stack
_Modules
  • Ledger
  • Numscript
    • Program Structure
    • Selecting an Interpreter
    • Unambiguous Monetary Notation
    • CLI
    • Numscript specs format
    • Reference
      • Send
      • Sources
      • Destinations
      • Rounding
      • Save
      • Overdraft
      • Variables
      • Metadata
      • oneofexp
      • Account Interpolationexp
      • get_assetexp
      • get_amountexp
      • Mid-script Function Callsexp
      • Asset Colorsexp
  • Connectivity
  • WalletsEE
  • FlowsEE
  • ReconciliationEE
  1. Modules
  2. Numscript
  3. Selecting an Interpreter
Numscript

Selecting an Interpreter

Since Ledger v2.2, two versions of the Numscript interpreter are available: the original, built directly into our Ledger service, and a new portable and embeddable interpreter that can run independently or enhance other ledgering systems.

The original interpreter is enabled by default but is no longer evolving, while the new version will receive ongoing updates and must be manually enabled.

To enable the new interpreter:

ledger.experimental-features
example: truedefault: falsebool

Enables general experimental features in the ledger by setting the EXPERIMENTAL_FEATURES environment variable on the deployment.

This setting can be configured on Formance Cloud deployments by contacting your Formance Cloud support team.
ledger.experimental-numscript
example: truedefault: falsebool

Enables the experimental Numscript interpreter in the ledger by setting the EXPERIMENTAL_NUMSCRIPT_INTERPRETER environment variable.

This setting can be configured on Formance Cloud deployments by contacting your Formance Cloud support team.

The new interpreter supports additional language features not available in the original, including oneof, account interpolation, asset colors, and more. See the Numscript reference for the full list and how to enable each one.

The Numscript playground uses the new interpreter. Experimental features can be toggled individually in the playground's feature flags selector.

Program StructureUnambiguous Monetary Notation