www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Error message issue

Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Coming from Java, C++, etc. where + is used for string concatenation I
initially wrote:

        assert ( iterative ( item[0] ) =3D=3D item[1] , "iterative ( " + to=
 ! string ( item[0] ) + " ) =3D " + to ! string ( item[1] ) ) ;

which results in:

        factorial_d2.d(45): Error: Array operation "iterative ( " + to(item=
[0u]) + " ) =3D " + to(item[1u]) not implemented

which does seem a bit off the wall.  Replacing + with ~ fixes the
problem, but the error message above wasn't that helpful in being able
to deduce this.

I think this is somewhat more than a RTFM, or "you should know the
basics of the language" in that D is very like C and Java and yet in
this one place has chosen a different symbol for the operation.

Not a big issue, just irritating.

--=20
Russel.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder ekiga.n=
et
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel russel.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
Mar 12 2011