official term for the -- operator?

D

Dave F

Is there an official term for the double hyphen operator, -- ?

Double hyphen doesn't really sound informative. Double negation is not the
answer because -- does not make negative numbers positive.

So???

Dave
 
D

Dave F

Sounds as good as anything...

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


Ragdyer said:
How does
"Double Unary"
suit you?
 
D

Dave F

Well that's typesetting terminology isn't it? Not sure that's really
applicable to this context?

Dave
 
T

T. Valko

Double unary

From Dictionary.com

unary
1. (or "monadic") A description of a function or operator which takes one
argument, e.g. the unary minus operator which negates its argument. The term
is part of the same sequence as nullary and binary.
..........
the unary minus operator which negates its argument.

Then the second unary minus operator converts it to positive.

Biff
 
D

Dave Peterson

Double minus signs?

It may be simpler to understand <bg>.

And wouldn't double negation put things back to what they were? Single negation
would change the signs.
 
D

Dave F

Interesting. So my supposition about double negation, which I said was
incorrect, was correct. Talk about double negation.

Thanks.

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


T. Valko said:
Double unary

From Dictionary.com

unary
1. (or "monadic") A description of a function or operator which takes one
argument, e.g. the unary minus operator which negates its argument. The term
is part of the same sequence as nullary and binary.
..........
the unary minus operator which negates its argument.

Then the second unary minus operator converts it to positive.

Biff
 
J

joeu2004

Dave F said:
Is there an official term for the double hyphen operator, -- ?
Double hyphen doesn't really sound informative. Double negation is not
the answer because -- does not make negative numbers positive.

Well, your first mistake is thinking that "--" is "an" operator. It
is simply two operators in a row, specifically two unary minus
operators. You could write -+-+-+(expr) with the same effect, if it
suits you. What is the term for that? (Rhetorical question.)

Secondly, the only purpose for writing two unary minus signs in that
manner is precisely for the reason that you dismiss, namely double
negation. The only reason why people use two unary minuses is to
cause Excel to treat the operand as numeric. We need two minuses to
double-negate the operand (i.e. negate it twice) in order to leave is
original value unchanged, whether it was positive or negative to begin
with.

In conclusion, I would not call "--" any operator, be it "the double
negation operator" or "the double unary minus" operator. But I
certainly would not call "the double unary [operator]". After all, "+
+" is also a "double unary operator".
 
Top