Back to Index

Definition: n_edge(expr) — Allowed: numeric expression; Not allowed: string expression.

Negative edge detector. Returns 1 only on a high-to-low transition of the specified expression (often in(n)) during the current cycle.

Example

if (n_edge(in(2))) {
  logn("Switch released");
}