Waher.Script 2.15.0. They require no host variables or external service. Your Neuron still determines whether each function is allowed in a particular execution context.
For the full syntax and function catalog, use the original Script reference.
The entries describe tested input types. They are a focused application reference, not a claim that every runtime overload or extension is available. See execution contexts and persistence before embedding them in a contract.
Abs(x)
Real number; returns non-negative magnitude.3. Selected function source.
Round(x)
Real number; returns the nearest integer-valued number, with midpoint ties to even.2. Selected function source.
Floor(x)
Real number; returns the greatest integer-valued number no larger than the input.-3. Selected function source.
Ceiling(x)
Real number; returns the least integer-valued number no smaller than the input.-2. Selected function source.
Min(x, y)
Two real numbers; returns the smaller value.3. Selected function source.
Max(x, y)
Two real numbers; returns the larger value.8. Selected function source.
Number(x)
Numeric text in the tested example; returns a number. Invalid numeric text raises an error. Alias: Num.12.5. Selected function source.
String(x)
Numeric value in the tested example; returns its text representation. Alias: Str."12.5". Selected function source.
Length(s)
String; returns the string length. The tested example is ASCII text.5. Selected function source.
Trim(s)
String; returns text with leading and trailing whitespace removed."note". Selected function source.
StartsWith(s, prefix)
Two strings; returns whether the string begins with the prefix.true. Selected function source.
Sum(v)
Vector of real numbers; returns their sum.6. Selected function source.
Count(v)
Vector; returns the number of entries.3. Selected function source.
Handle invalid input
Number("not a number") raises an evaluation error in the same test suite. Validate input types and choose a deliberate error or fallback policy. Round uses ties-to-even; a payment integration must define its own units and rounding requirements.
The reference metadata records source revision and test-case identifiers. Each entry includes the expression and expected result; start with the Script quickstart for a worked calculation.