r/w binary

Ali Çehreli acehreli at yahoo.com
Thu Jun 30 11:07:29 PDT 2011


On Fri, 01 Jul 2011 05:28:56 +1200, Joel Christensen wrote:

> Shouldn't file.rawWrite((&i)[0..1]); have [0..4]? Or am I missing some
> thing?

[0..1] follows the regular slicing syntax there: those are element 
indexes. Since &i is an int*, [0..1] slices the first int. It would be 
different if it were ubyte* or void*.

Ali


More information about the Digitalmars-d-learn mailing list