linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Steve Graegert" <graegerts@gmail.com>
To: linux-c-programming@vger.kernel.org
Subject: Re: Significance of using + before function calls.
Date: Wed, 15 Mar 2006 13:11:45 +0100	[thread overview]
Message-ID: <6a00c8d50603150411i770b4e51j96c8647c26632aa5@mail.gmail.com> (raw)
In-Reply-To: <4417C928.6070008@computer.org>

On 3/15/06, Per Jessen <per@computer.org> wrote:
> Steve Graegert wrote:
> >
> > The unary plus operator returns the value of an expression.  Neither
> > the unary plus nor unary minus operators produce lvalues and is of
> > limited use.
>
> So what might be the intention of someone using it like the OP
> described?  It doesn't make much sense, right?

I suppose it's there for a clean implementation of operators in C. 
While the unary minus returns the negative of the operand the unary
plus returns the value to avoid ambiguity, i.e. shall the unary plus
return the positive of a negative operand, as the unary minus does? 
IMHO, not a result I'd expect.

	\Steve

  reply	other threads:[~2006-03-15 12:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-15 12:59 Significance of using + before function calls Vamsi
2006-03-15  7:51 ` Steve Graegert
2006-03-15  7:58   ` Per Jessen
2006-03-15 12:11     ` Steve Graegert [this message]
2006-03-15  7:59 ` Joel M. Pareja
2006-03-15 13:40   ` Vamsi
2006-03-15  8:16     ` Joel M. Pareja
2006-03-15 10:09 ` Glynn Clements
2006-03-15 15:48   ` Vamsi
2006-03-15 20:34 ` Tomas Janousek

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=6a00c8d50603150411i770b4e51j96c8647c26632aa5@mail.gmail.com \
    --to=graegerts@gmail.com \
    --cc=linux-c-programming@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).