More D newb questions.

BCS BCS at pathlink.com
Mon May 5 09:28:59 PDT 2008


Me Here wrote:
> /* line 88 */                       ] = abcd[ b1 ] ~ abcd[ b2 ] ~ abcd[ b3 ] ~
> abcd[ b4 ]
>                                       ~ abcd[ b5 ] ~ abcd[ b6 ] ~ abcd[ b7 ] ~
> abcd[ b8 ];
> 
> The errors:
> c:\dmd\test>dmd -O -inline count2Bit.d
> count2Bit.d(88): Error: Can only concatenate arrays, not (int ~ int)
> 
> Why does D think I'm trying to concatenate ints, when teh only expressions
> involving catenation are
> slices of char[] abcd?
> 

for one thing "abcd[b1]" is not a slice, if you want a slice use 
"abcd[b1..b1+1]"



More information about the Digitalmars-d mailing list