slice based on base and width

Chang Long changlon at gmail.com
Sun Sep 8 05:02:35 PDT 2013


On Sunday, 8 September 2013 at 10:53:23 UTC, Øivind wrote:
>
>>  a[c -: d]   //D: a[c-d .. c]
>
> I think this should be
>
> a[c -: d]   //D: a[c-d+1 .. c+1],  e.g. a[5 -: 2] == [a[4], 
> a[5]]


try &a[base][0..width]


More information about the Digitalmars-d mailing list