Interesting GCC extensions

Rainer Deyke rainerd at eldwood.com
Mon Sep 28 20:04:27 PDT 2009


Adam D. Ruppe wrote:
> Trying it, I see it doesn't actually work in initialization, but you
> can do it after the fact easily enough:
> 
> 	int[101] a;
> 	a[0..9] = 1;
> 	a[10..99] = 2;
> 	a[100] = 3;

This leaves elements 9 and 99 uninitialized.  I assume the gcc version
does not.


-- 
Rainer Deyke - rainerd at eldwood.com



More information about the Digitalmars-d mailing list