www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: The new ?? and ??? operators

Stewart Gordon Wrote:

 "Arlen Albert Keshabyan" <arlen.albert gmail.com> wrote in message 
 news:fd6ee0$nd4$1 digitalmars.com...
 Stewart Gordon Wrote:
 "Arlen Albert Keshabyan" <arlen.albert gmail.com> wrote in message
 news:fd68lm$f4r$1 digitalmars.com...
 A a = APointer1 ?? APointer2 ?? APointer3;

 the line above is equal to the line below:

 A a = APointer1 != null ??? APointer2 != null ??? APointer3 != null ???
 null;

Not by the way you specified it. The first would assign to a an actual object reference; the second would try to assign a boolean value.


 No. The code lines do the same thing anyway.

Which same thing - evaluating to a boolean or evaluating to an object reference? Are you going to supply a corrected version of your proposal? Stewart. -- My e-mail address is valid but not my primary mailbox. Please keep replies on the 'group where everybody may benefit.

It evaluates to an object reference.
Sep 24 2007