How to initialise array of ubytes?

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Nov 29 12:33:23 PST 2014


On Sat, 29 Nov 2014 21:28:36 +0100
Daniel Kozak via Digitalmars-d-learn
<digitalmars-d-learn at puremagic.com> wrote:

> Dne Sat, 29 Nov 2014 21:10:41 +0100 Paul via Digitalmars-d-learn  
> <digitalmars-d-learn at puremagic.com> napsal(a):
> 
> > I'm trying to do this:
> >
> > ubyte[MAPSIZE][MAPSIZE] map = 1;
> >
> > but it doesn't work and I can't seem to cast the value to a ubyte (which  
> > looks rather ugly and out of place in D anyway). Is there a way to do  
> > this other than using a couple of loops?
> >
> > Cheers
> >
> > Paul
> 
> http://stackoverflow.com/questions/24600796/d-set-default-value-for-a-struct-member-which-is-a-multidimensional-static-arr/24754361#24754361
aaaargh, make me unsee that! that's... disgusting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20141129/8b9a36ae/attachment.sig>


More information about the Digitalmars-d-learn mailing list