More D newb questions.

Me Here p9e883002 at sneakemail.com
Wed May 7 15:25:04 PDT 2008


Janice Caron wrote:

> 2008/5/7 Me Here <p9e883002 at sneakemail.com>:
> >  So then, <i>if</i> a ~ b worked
> 
> Sorry to be pedantic, but a ~ b does work. It does exactly what it's
> defined to do. What you mean is, if a ~ b exhibited the bizarre and
> unexpected behavior suggested in this thread.
> 

Sorry to be pedantic in response, but in what way does it work?

	import std.stdio;

	void main() {
	    char a = 'a', b = 'b';
	    writefln( a ~ b );    
	}
	c:\dmd\test>dmd junk3.d
	junk3.d(5): Error: Can only concatenate arrays, not (int ~ int)

By implication from the subject of the entire thread, a and b are chars.

b.
-- 




More information about the Digitalmars-d mailing list