Read Byte Array to Integer

Ali Çehreli acehreli at yahoo.com
Sat Nov 23 07:21:01 PST 2013


On 11/23/2013 04:08 AM, Jeroen Bollen wrote:
> On Friday, 22 November 2013 at 23:12:25 UTC, Ali Çehreli wrote:
>> That means that the slice itself cannot be modified, meaning that it
>> cannot be consumed by read. Can't work... :)
>
> Why does read need to be able to change the byte array?

 From the documentation: "The T.sizeof bytes which are read are consumed 
from the range."

   http://dlang.org/phobos/std_bitmanip.html#.read

When it comes to arrays, only slices that support popFront() are ranges.

Ali



More information about the Digitalmars-d-learn mailing list