This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: $argc variable
Eli Zaretskii wrote:
Btw, Andrew, why do you post patches to gdb@sources.redhat.com, rather
than to gdb-patches@ ? The latter is the right place.
I post patches to gdb-patches@ and other messages to gdb@ which, in this
case, has a patch as a follow up. Should I switch list as soon as I have
a patch? That seems a little disconnected to me, but I see your point. I
originally posted the new options I had to gdb@ because I thought they
might be a little more controversial - I also called them RFC.
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.
I would respectfully suggest that manuals should be written for those
that do NOT know what they are doing. However, as you say, using
upper-case for non-literal text is fine and I understand that and if
users try to type it then there are bigger problems than case.
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. ;-)
Well, I would have been happy with the wrong mark-up if the end
type-face had been right - it just depends on your point of view ;)
-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}}.
Err, haven't you just put back the @var, and therefore upper case, that
we just agreed shouldn't be there?
+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.
But this is an example of how to use $arg0 ?!?!? Also, it isn't my
example, I only added the 'end'.
+@kindex $argc
I'd replace this with "@cindex arguments for user-defined function".
Replace or augment? I considered adding a kindex for $arg0...$arg9.
I agree that a concept should be added, but how about:
@cindex user-defined functions, argument passing
Just a thought.
Other than that, the documentation patch is okay with me. Thanks.
Great, I'll wait for judgement on the code then.
Thanks
Andrew Stubbs