aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Tcl_shipped.html11
-rw-r--r--jim_tcl.txt4
-rw-r--r--jimsh.c1
3 files changed, 15 insertions, 1 deletions
diff --git a/Tcl_shipped.html b/Tcl_shipped.html
index 99d87b7..1fb31eb 100644
--- a/Tcl_shipped.html
+++ b/Tcl_shipped.html
@@ -6302,6 +6302,15 @@ by the Tcl library.</p></div>
</p>
</dd>
<dt class="hdlist1">
+<tt><strong>argc</strong></tt>
+</dt>
+<dd>
+<p>
+ If jimsh is invoked to run a script, this variable contains the number
+ of arguments supplied to the script.
+</p>
+</dd>
+<dt class="hdlist1">
<tt><strong>jim_argv0</strong></tt>
</dt>
<dd>
@@ -6365,7 +6374,7 @@ official policies, either expressed or implied, of the Jim Tcl Project.</tt></pr
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Last updated 2010-10-15 11:11:55 EST
+Last updated 2010-10-20 10:12:09 EST
</div>
</div>
</body>
diff --git a/jim_tcl.txt b/jim_tcl.txt
index a11177f..0e9a780 100644
--- a/jim_tcl.txt
+++ b/jim_tcl.txt
@@ -4285,6 +4285,10 @@ The following global variables are set by jimsh.
If jimsh is invoked to run a script, this variable contains a list
of any arguments supplied to the script.
++*argc*+::
+ If jimsh is invoked to run a script, this variable contains the number
+ of arguments supplied to the script.
+
+*jim_argv0*+::
The value of argv[0] when jimsh was invoked.
diff --git a/jimsh.c b/jimsh.c
index d5ad678..63569a7 100644
--- a/jimsh.c
+++ b/jimsh.c
@@ -134,6 +134,7 @@ static void JimSetArgv(Jim_Interp *interp, int argc, char *const argv[])
}
Jim_SetVariableStr(interp, "argv", listObj);
+ Jim_SetVariableStr(interp, "argc", Jim_NewIntObj(interp, argc));
}
int main(int argc, char *const argv[])