Definition: return [expr]; — Allowed: inside func only; Not allowed: scheduled/event blocks or top-level script statements.
Use return expr; to return a value from a function (or return; for void-style exits). For early-exit inside scheduled/event blocks, use next;.
func abs(x) {
if (x >= 0) return x;
return 0 - x;
}