casting and arrays..

Chris Warwick sp at m.me.not
Sat Mar 10 15:32:18 PST 2007


 std.file.read(filename);

returns type void[]

And it it seems i can cast that to whatever type i like, int[], bool[], 
ect.. anyway it compiles... but.. when casting between array types like this 
are runtime checks made to make sure the block being cast has the correct 
granularity.. if the return was void[7] will i get an runtime error casting 
it to int? Does a cast like that even work?

cheers,

cw





More information about the Digitalmars-d-learn mailing list