2 argv - count or value of a calc command line supplied argument
13 Without args, this builtin returns the number of calc command line
16 If the numeric arg is supplied, then the corresponding command line
17 string is return, if it exists. Otherwise a nul() value is returned.
19 In keeping with the argc/argv convention of C, argv(0) will refer
20 to the 1st argv string, and argv(argv()-1) will refer to the last.
21 This differs from the way the param() builtin works.
23 By default, calc will evaluate all of its command line arguments.
24 However, if calc is invoked with -s, all non-dashed options will
25 be left as unevaluated strings. Thus:
29 will cause calc to print 4 and enter interactive mode. In this case
36 will cause calc to interactive mode. The argv() builtin will return 1
37 and argv(0) will return the string "2+2".
42 ; for (i = 0; i < argc; i++) print "argv[": i : '] = "': argv(i) : '"';
56 ## Copyright (C) 1999-2006 Landon Curt Noll
58 ## Calc is open software; you can redistribute it and/or modify it under
59 ## the terms of the version 2.1 of the GNU Lesser General Public License
60 ## as published by the Free Software Foundation.
62 ## Calc is distributed in the hope that it will be useful, but WITHOUT
63 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
64 ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
65 ## Public License for more details.
67 ## A copy of version 2.1 of the GNU Lesser General Public License is
68 ## distributed with calc under the filename COPYING-LGPL. You should have
69 ## received a copy with calc; if not, write to Free Software Foundation, Inc.
70 ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
72 ## @(#) $Revision: 30.1 $
73 ## @(#) $Id: argv,v 30.1 2007/03/16 11:10:42 chongo Exp $
74 ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/argv,v $
76 ## Under source code control: 1999/11/23 19:45:05
77 ## File existed as early as: 1999
79 ## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
80 ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/