Commands
Measure
Ask the athlete to report an input once they have finished what an exec or a group specified.
Purpose
The Measure command can be used inside an exec as well as inside a group. Its sole purpose is to instruct the athlete to measure an input after they have finished performing the exec or the group.
Measuring is how feedback gets into a program. It is the difference between a program that prescribes and a program that listens.
Definition
A measure command is the keyword measure followed by one or more inputs,
separated by commas:
action BackSquat [title: "Back squat"]
output:number reps [title: "Reps"]
output:|kg| weight [title: "Weight"]
input:number reps [title: "Reps"]
input:|kg| weight [title: "Weight"]
input:number rpe [title: "RPE"]
exec squat() {
specify:BackSquat reps 5, weight 100|kg|
measure reps, weight
measure rpe
}
squat()
Execution
When a measure command runs, it adds the input to the collection of inputs
that the athlete should measure: when they finish performing the
specification, if it is an exec, or when the group finishes, if it is a group.
Inputs accumulate as the measure commands run, so the example above asks for
reps, weight and rpe.
In an exec
The measured inputs appear on the same screen as the specification. When an
input has the same name as a specified output, as reps and weight do above,
the athlete sees the field for what they did right next to the target. The
mobile app treats an untouched field as “hit the target”, so on
a good day the athlete just continues.
In a group
A group has no screen of its own, so the athlete is asked for the group’s inputs on one extra screen, after everything in the group is done. See group.
Using the answers
Whatever the athlete enters comes back as the value of the exec or group call. Store it and read the inputs by name:
action BackSquat [title: "Back squat"]
output:number reps [title: "Reps"]
input:number reps [title: "Reps"]
exec squat() {
specify:BackSquat reps 5
measure reps
}
let set = squat()
if (set.reps < 5) {
squat()
}
There is a lot more to say about it in feedback.