Definition: toggle(idx) — Allowed: numeric expression index; Not allowed: string index.
Flips the specified digital output (1-based index in scripts). Argument is any expression that resolves to the output index.
if (p_edge(in(1))) {
toggle(1);
}