Find a function by task
Use the original reference for additional signatures. Check that the chosen function is available in the contract or machine context where you will run it.
Numeric functions used in these examples
The following scalar cases were evaluated withWaher.Script 2.15.0. They require no context variables and have no external side effects.
These functions also implement complex scalar cases in the selected source. The table’s tested examples cover real numbers. Confirm the supported type for the receiving contract parameter. Unsupported input types can fail evaluation.
Round is not a complete monetary-rounding policy. A payment workflow must define its units, precision, and rounding rules explicitly.
Use the tested function reference for numeric conversion, strings, collections, bounds, and rounding. It links each signature to an executable example and its expected value.
Expressions in a contract
A parameter’s validation expression uses the values exposed by the contract context. Calculated parameters derive values from those inputs. See contract parameters and the CalculatedParameters example. The selected contract parser populates named parameters andDuration before validation. When a first signature exists, it also supplies Now and NowUtc from that signature’s timestamp. These are not an instruction to read the current wall clock. Avoid assuming they exist in an unsigned template.
Keep validation deterministic. A function that reads external mutable data can make the result depend on when or where evaluation occurs.
Expressions in a state machine
Event data exists only when the selected event defines it. For example, a note event can assign the note to a variable named by its
noteVariable setting. Initialize every variable your expression reads, and avoid colliding with event variable names.
The selected machine implementation creates evaluation variables from saved values and supplies a CurrentState host object. Treat that object as host context, not as a portable API response schema. The complete example uses its own Count variable and does not depend on host-object members or note-data variables.
Persist a value
Ordinary assignment changes the evaluation variables. To retain a value across machine actions, usePersistVariable:
Count. Verify the new value and recorded history after triggering the complete machine.