Thread overview
disallowed real->complex?
Apr 06, 2005
Thomas Kuehne
Apr 07, 2005
Stewart Gordon
Apr 07, 2005
Thomas Kuehne
April 06, 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

http://digitalmars.com/d/changelog.html#new0120
# Complex types can no longer be implicitly converted to non-complex
# types.
# Real and imaginary types can no longer be implicitly converted to each
# other.

Both lines should compile.
#
# cdouble a = 22.0;		// fails
# cdouble a = 22.0+0.0i;	// compiles
#

The conversion real->complex is still allowed.

Added to DStress as http://dstress.kuehne.cn/run/creal_21.d

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFCVEn03w+/yD4P9tIRAtSGAKCQQqJoC97Ee+/Et9Y4gHDoSGxKnACePccE
LRlcSyZSO1XBqYAxSNd5Krg=
=GSCW
-----END PGP SIGNATURE-----
April 07, 2005
Thomas Kuehne wrote:
<snip>
> Both lines should compile.
> #
> # cdouble a = 22.0;		// fails
> # cdouble a = 22.0+0.0i;	// compiles
> #
> 
> The conversion real->complex is still allowed.
<snip>

Did you test imaginary->complex as well?

Stewart.


-- 
My e-mail is valid but not my primary mailbox.  Please keep replies on the 'group where everyone may benefit.
April 07, 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stewart Gordon schrieb am Thu, 07 Apr 2005 13:29:27 +0100:
> Thomas Kuehne wrote:
><snip>
>> Both lines should compile.
>> #
>> # cdouble a = 22.0;		// fails
>> # cdouble a = 22.0+0.0i;	// compiles
>> #
>> 
>> The conversion real->complex is still allowed.
><snip>
>
> Did you test imaginary->complex as well?

Doesn't work either
http://dstress.kuehne.cn/run/creal_22.d

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFCVTj33w+/yD4P9tIRAslIAJ42ISxNbqVDTDTnqAzgOg68w3B46QCgiGIH
TBfoUkOBCarq0JZZMps4rrw=
=17Ln
-----END PGP SIGNATURE-----