On 08/02/2010 10:23 AM, Dmitry Olshansky wrote:
On 02.08.2010 5:23, bearophile wrote:
Can you tell me why std.file.read() returns a void[] instead of
something like a ubyte[]?

Well, it magically converts to whatever array type you have. So this works:
ubyte[] data = read("trash.txt");

This code does not work for me.

It's interesting fact deserving further investigation. It seems that
void[] arrays are converted implicitly, this also works:
void[] tr = malloc(20)[0..20];
data = tr;

Neither does this.

I am running 2.047, am I doing something wrong?

Reply via email to