5 lines
527 B
Text
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 };
|