|
Archives
D Programming
digitalmars.Ddigitalmars.D.bugs digitalmars.D.dtl digitalmars.D.ide digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger D.gnu D C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript electronics |
digitalmars.D.learn - op=
according to the spec, a op= b; is semantically equivalent to a = a op b; but this doesn't seem to be strictly true. for example: char c = 'a'; real r = 3.14; c = c + r; // error c += r; // accepted; seems to be doing c += floor(r); is this behavior intentional? Jan 21 2010
Ellery Newcomer wrote:according to the spec, a op= b; is semantically equivalent to a = a op b; but this doesn't seem to be strictly true. Jan 21 2010
On Thu, 21 Jan 2010 22:44:24 -0500, Ellery Newcomer <ellery-newcomer utulsa.edu> wrote:according to the spec, a op= b; is semantically equivalent to a = a op b; but this doesn't seem to be strictly true. for example: char c = 'a'; real r = 3.14; c = c + r; // error c += r; // accepted; seems to be doing c += floor(r); is this behavior intentional? Jan 22 2010
On 01/22/2010 12:23 PM, Steven Schveighoffer wrote:On Thu, 21 Jan 2010 22:44:24 -0500, Ellery Newcomer <ellery-newcomer utulsa.edu> wrote:according to the spec, a op= b; is semantically equivalent to a = a op b; but this doesn't seem to be strictly true. for example: char c = 'a'; real r = 3.14; c = c + r; // error c += r; // accepted; seems to be doing c += floor(r); is this behavior intentional? Jan 23 2010
|