blob: 90bc3b0e5dc39fddb5bf69f2a00569ba954a75fe [file] [log] [blame]
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>incr0</title><link rel="stylesheet" type="text/css" href="rivet.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="Apache Rivet 3.0"><link rel="up" href="commands.html" title="Rivet Tcl Commands and Variables"><link rel="prev" href="include.html" title="include"><link rel="next" href="inspect.html" title="inspect"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">incr0</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="include.html"><img src="images/prev.png" alt="Prev"></a> </td><th width="60%" align="center">Rivet Tcl Commands and Variables</th><td width="20%" align="right"> <a accesskey="n" href="inspect.html"><img src="images/next.png" alt="Next"></a></td></tr></table></div><div class="refentry"><div class="refentry.separator"><hr></div><a name="incr0"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>incr0 — increment a variable or set it to 1 if nonexistent.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis" style="width:80%"><div style="border: 1px solid #282; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">incr0</span> ?<span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>varname</code></em></span>? ?<span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>num</code></em></span>?</div></div></div><div class="refsect1"><a name="idm45412676752352"></a><h2>Description</h2><p style="width:90%">
Increment a variable
<em class="replaceable"><code>varname</code></em> by
<em class="replaceable"><code>num</code></em>. If the
variable doesn't exist, create it instead of returning an
error.
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top">
incr0 functionality is provided by the native <span style="font-family:monospace"><span class="command"><strong>incr</strong></span></span> in
Tcl &gt;= 8.5, therefore this command is deprecated and kept as an
interpreter alias only for compatibility. As such <span style="font-family:monospace"><span class="command"><strong>incr0</strong></span></span>
wasn't moved to the ::rivet namespace and
it will be removed in future versions of Rivet.
</td></tr></table></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="include.html"><img src="images/prev.png" alt="Prev"></a> </td><td width="20%" align="center"><a accesskey="u" href="commands.html"><img src="images/up.png" alt="Up"></a></td><td width="40%" align="right"> <a accesskey="n" href="inspect.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">include </td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a></td><td width="40%" align="right" valign="top"> inspect</td></tr></table></div></body></html>