incr0 — increment a variable or set it to 1 if nonexistent.


incr0 ?varname? ?num?


Increment a variable varname by num. If the variable doesn't exist, create it instead of returning an error.

incr0 functionality is provided by the native incr in Tcl >= 8.5, therefore this command is deprecated and kept as an interpreter alias only for compatibility. As such incr0 wasn't moved to the ::rivet namespace and it will be removed in future versions of Rivet.