What to use instead of array.join if RHS is not a range?
    Jonathan M Davis 
    jmdavisProg at gmx.com
       
    Tue Nov 27 13:50:44 PST 2012
    
    
  
On Tuesday, November 27, 2012 13:05:12 Andrej Mitrovic wrote:
> On 11/27/12, Jonathan M Davis <jmdavisProg at gmx.com> wrote:
> > All you need to do is put it in an array.
> > 
> > arr.join([s]);
> 
> Still doesn't work.
> 
> > S[1] s = void;
> > s[0] = S(0);
> > arr.join(s[]);
> 
> Neither does that.
> 
> http://d.puremagic.com/issues/show_bug.cgi?id=9082
Oh, wait. The problem is that you're calling join on something that isn't a 
range of ranges. It makes no sense to join an array which doesn't hold ranges. 
There's nothing to join. Rather, you're asking it to insert an element between 
every element in range, which is similar but not the same.
- Jonathan M Davis
    
    
More information about the Digitalmars-d-learn
mailing list