From: Eli Zaretskii <eliz@gnu.org>
To: Vladimir Prus <ghost@cs.msu.su>
Cc: gdb-patches@sources.redhat.com
Subject: Re: -var-info-path-expression
Date: Sat, 01 Sep 2007 07:56:00 -0000 [thread overview]
Message-ID: <uy7fqvmxi.fsf@gnu.org> (raw)
In-Reply-To: <200708312252.47584.ghost@cs.msu.su> (message from Vladimir Prus on Fri, 31 Aug 2007 22:52:47 +0400)
> From: Vladimir Prus <ghost@cs.msu.su>
> Date: Fri, 31 Aug 2007 22:52:47 +0400
> Cc: gdb-patches@sources.redhat.com
>
> > > +For example, if @var{a} is an array, and variable object
> > > +@var{A} was created for @var{a}, then we'll get this output:
> >
> > It's wrong to use @var in this context: here, `a' and `A' are literal
> > symbols, they do not stand for something else. So you should use
> > @code, not @var.
>
> So, @var is not for programming language variables (like docbook's varname),
> but rather a placeholder (like docbook's replaceable)?
Yes, it's a placeholder. It's for the cases when you want to say
things like
frobnicate FILE
and FILE is to be replaced by an actual filename when this command is
used.
There's one borderline case where @var is used, although you could
have said that its argument is not a placeholder: when you describe a
prototype of a function:
int foo (char *bar, struct something *baz);
(This example is for C/C++, but similar examples exist in other
languages that support functions with arguments.) The Texinfo @def*
constructs render the arguments in the @var typeface, for example. In
these cases, we will give "bar" and "baz" the @var markup, because
they are formal parameters of the function, and will be replaced by
something else when the function is actually called. The tricky
aspect of this is that when you describe the parameters from _outside_
of the function, e.g. tell someone how to call it, you should use
@var, while for the description of the _inside_, like when you tell
how it works and cite certain parts of its code, those same symbols
should be in @code, because inside the function they are literal
symbols.
It is these borderline cases, as well as the name of the markup (which
mentally reminds you of the word "variable"), which cause confusion
about its usage.
next prev parent reply other threads:[~2007-09-01 7:56 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-22 11:23 -var-info-path-expression Vladimir Prus
2007-08-22 15:28 ` -var-info-path-expression Daniel Jacobowitz
2007-08-28 17:18 ` -var-info-path-expression Vladimir Prus
2007-08-28 19:55 ` -var-info-path-expression Eli Zaretskii
2007-08-31 9:08 ` -var-info-path-expression Eli Zaretskii
2007-08-31 9:57 ` -var-info-path-expression Vladimir Prus
2007-08-31 18:04 ` -var-info-path-expression Eli Zaretskii
2007-08-31 18:53 ` -var-info-path-expression Vladimir Prus
2007-09-01 7:56 ` Eli Zaretskii [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-06-18 10:43 -var-info-path-expression Vladimir Prus
2007-06-18 19:40 ` -var-info-path-expression Eli Zaretskii
2007-06-21 5:15 ` -var-info-path-expression Vladimir Prus
2007-07-03 17:14 ` -var-info-path-expression Daniel Jacobowitz
2007-07-03 17:51 ` -var-info-path-expression Vladimir Prus
2007-07-03 17:58 ` -var-info-path-expression Daniel Jacobowitz
2006-12-25 9:02 -var-info-path-expression Vladimir Prus
2007-01-03 22:39 ` -var-info-path-expression Daniel Jacobowitz
2007-01-05 9:14 ` -var-info-path-expression Vladimir Prus
2007-01-27 21:49 ` -var-info-path-expression Vladimir Prus
2007-01-28 0:46 ` -var-info-path-expression Nick Roberts
2007-01-28 7:57 ` -var-info-path-expression Vladimir Prus
2007-01-28 8:35 ` -var-info-path-expression Nick Roberts
2007-01-29 10:53 ` -var-info-path-expression Vladimir Prus
2007-01-29 12:17 ` -var-info-path-expression Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=uy7fqvmxi.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sources.redhat.com \
--cc=ghost@cs.msu.su \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox