Trainerflow Docs trainerflow.com
Commands › Specify

Commands

Specify

Attach a value to an output of an action, as part of the specification an exec hands the athlete.

Purpose

The Specify command can only be used inside an exec and its purpose is to assign an output and its associated value to an action. In other words, it is how a program says “do this, this much”.

Definition

A specify command starts with specify:, followed by the action and then one or more pairs of an output and its value, separated by commas:

action BackSquat [title: "Back squat"]
output:number reps [title: "Reps"]
output:|kg| weight [title: "Weight"]

exec squat() {
    specify:BackSquat reps 5, weight 100|kg|
}

squat()

The value can be any expression, e.g. weight + 10|kg|, as long as its type matches the type of the output. reps takes a number and weight takes a measurement of mass, so 100|kg| works and so does 220|lb|.

You can write the same thing as two separate commands; the two forms are equivalent:

action BackSquat [title: "Back squat"]
output:number reps [title: "Reps"]
output:|kg| weight [title: "Weight"]

exec squat() {
    specify:BackSquat reps 5
    specify:BackSquat weight 100|kg|
}

squat()

Without an action

The action is optional. A specification without one is not about any particular exercise, which suits things like a coaching cue or a target for the whole screen:

output:string cue [title: "Cue"]

exec brief() {
    specify cue "Stay tall and breathe"
}

brief()

Execution

When a specify command runs, as part of the commands of an exec, it adds the output together with its value to the action’s specification. When the exec finishes, the athlete is shown every action with all the outputs specified for it.

Because the specification builds up as the exec runs, you can specify conditionally:

action BackSquat [title: "Back squat"]
output:number reps [title: "Reps"]
output:|kg| weight [title: "Weight"]
output:number rpe [title: "RPE"]

exec squat(load, rpe) {
    specify:BackSquat reps 5, weight load
    if (rpe) {
        specify:BackSquat rpe rpe
    }
}

squat(100|kg|, nil)
squat(100|kg|, 8)

The first call shows reps and weight only; the second also shows the RPE. If the same output is specified twice for an action, the last value wins.

Specifying more than one action in the same exec puts them all on the same screen, which is how you write a superset. See exec.