Back to Index

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

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

Example

if (p_edge(in(1))) {
  logn("Button pressed");
}