This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: $argc variable
> Date: Tue, 08 Nov 2005 12:48:20 +0000
> From: Andrew STUBBS <andrew.stubbs@st.com>
> Cc: GDB List <gdb@sources.redhat.com>
Btw, Andrew, why do you post patches to gdb@sources.redhat.com, rather
than to gdb-patches@ ? The latter is the right place.
> In the documentation I changed a '@var' to '@code' because @var makes it
> upper case in the info and I thought that misleading.
Upper case is not the problem: makeinfo produces an uppercase word
from @var since time immemoriam, so anyone who's used to read Info
manuals is already used to that.
The problem here is that it's simply wrong to use @var in this case,
because $arg0 etc. are literal strings, to be used verbatim in the
actual script, not placeholders that stand for something else. So
your change is correct, although for the wrong reasons. ;-)
> -via @var{$arg0@dots{}$arg9}. A trivial example:
However, there _is_ something wrong here: the $ part should be outside
@var, since it's a literal character:
via @code{$@var{arg0}@dots{}$@var{arg9}}.
> +via @code{$arg0@dots{}$arg9}. A trivial example:
>
> @smallexample
> define adder
> print $arg0 + $arg1 + $arg2
> +end
> @end smallexample
In the example, I would suggest to use something other than arg0 etc.,
to avoid confusion with arg0..arg9 as placeholders in the paragraph
where you wanted to remove @var.
> +@kindex $argc
I'd replace this with "@cindex arguments for user-defined function".
Other than that, the documentation patch is okay with me. Thanks.