Alex Rivera | Logout

D operators that are not in C++

Asked 2010-04-22T16:41:10.367
14

Are there any operators in D that are not in C++?

c++ d
Edit
Report

2 Answers

6

Here is a list of some D tokens

/=
.
..
...
&
&=
&&
|
|=
||
-
-=
--
+
+=
++
<
<=
<<
<<=
<>
<>=
>
>=
>>=
>>>=
>>
>>>
!
!=
!<>
!<>=
!<
!<=
!>
!>=
(
)
[
]
{
}
?
,
;
:
$
=
==
*
*=
%
%=
^
^=
~
~=

Those for example:

<>
<>=
!<>
!<>=
!<
!<=
!>
!>=

are special operators to compare floating point variables. You can find the description of them here http://www.digitalmars.com/d/1.0/expression.html

There are also the

is 
!is
in
!in
typeof

operators.

answered 2010-04-22T17:14:59.077
5
  • ^^ and ^^= for exponentiation
  • ~ and ~= for concatenation
  • >>> and >>>= for signed (or is it unsigned) bit shift
answered 2010-04-22T16:59:18.433

Your Answer