flowrs-engine/e2e/fixtures/appexport/counter.fdsl
flowRS fd958c0547 flowRS engine, cut from flowRS 3451b065
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-02 19:04:39 -05:00

5 lines
527 B
Text

//! title: A counter on a step loop, read on a gauge
//! description: math.add feeds its own input through a held wire, so each pass of the program's step loop adds one; an Indicator shows the count on a gauge from 0 to 10. Exported with ten steps, the program prints the count once a pass, and the app's shell draws every pass.
let n0 = FloatLiteral { value: 1, unit: "{count}" };
let n1 = math.add(a: n1.sum.copy().prev(), b: n0.value);
let n2 = Indicator(input: n1.sum) { label: "Count", kind: "numeric", min: 0, max: 10 };